Skip to content

Commit

Permalink
Change hook
Browse files Browse the repository at this point in the history
  • Loading branch information
m-bert committed Dec 6, 2024
1 parent 9ada0d6 commit df1c2aa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class NativeViewGestureHandler : GestureHandler<NativeViewGestureHandler>() {
/**
* Checks whether handler can activate. Used by TextViewHook.
*/
fun canActivate(view: View) = true
fun canActivate(view: View) = view.isPressed

/**
* Called after the gesture transitions to the END state.
Expand Down Expand Up @@ -225,7 +225,7 @@ class NativeViewGestureHandler : GestureHandler<NativeViewGestureHandler>() {

// We have to explicitly check for ReactTextView, since its `isPressed` flag is not set to `true`,
// in contrast to e.g. Touchable
override fun canActivate(view: View) = view.isPressed || view is ReactTextView
override fun canActivate(view: View) = view is ReactTextView
}

private class EditTextHook(
Expand Down

0 comments on commit df1c2aa

Please sign in to comment.