Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onResponderEnd not called when tabbing while holding onto a view #2657

Open
1 task done
ToyboxZach opened this issue Apr 23, 2024 · 2 comments
Open
1 task done

onResponderEnd not called when tabbing while holding onto a view #2657

ToyboxZach opened this issue Apr 23, 2024 · 2 comments
Labels

Comments

@ToyboxZach
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Describe the issue

If you have a Pressable and declare onResponderEnd


 <Pressable
      
        onResponderEnd={() => {
          console.log("VIEW END");
        }}
      >

Then start dragging on it and then press tab until you lose focus on it. You lose focus on it, but never have onResponderEnd get called

Expected behavior

onResponderEnd should be called whenever you lose touch focus on the view.

Steps to reproduce

Declare a pressable with onResponderEnd:

 <Pressable
      
        onResponderEnd={() => {
          console.log("VIEW END");
        }}
      >

Start holding it, and then tab away

Look at the console logs, for any things that come up.

In my demo, if the object stays blue we didn't get a release.

Test case

https://codesandbox.io/p/sandbox/react-native-web-pressable-nesting-forked-n2ffv2?file=%2Fsrc%2FApp.js%3A25%2C24

Additional comments

Issue arose while using this package @react-native-assets/slider

@ToyboxZach ToyboxZach added the bug label Apr 23, 2024
@necolas
Copy link
Owner

necolas commented Apr 23, 2024

What does "tab away" mean?

@ToyboxZach
Copy link
Contributor Author

Ah sorry that means press tab until you have focus on something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants