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
Interactions briefly unresponsive after navigating between screens #95
Comments
I noticed the same on my Pixel 2. |
@kmagiera Appreciate you're a busy person, but is there any chance of an update regarding a fix for this? Still an issue on latest, I would love to give it a go if you can point me in the right direction! :) |
Hey all. I'm not really sure the details provided here are enough for me to look into. Please check the linked issues and in particular whether #188 fixes the problem. I'd be happy to take a look or provide guidance but for that I'd need:
|
Hey @kmagiera, you can find a demo app here https://github.com/jack828/RNScreenDemo. To demonstrate the issue: First, comment out the line here. Unfortunately #188 does not help, as I've only seen this on android. (iOS untested) Please let me know if this is enough information for you! EDIT: I can't find the issue but someone mentioned this change in this file https://github.com/kmagiera/react-native-screens/blob/d4636d31302da01a12a711510ebad729d5d7558b/android/src/main/java/com/swmansion/rnscreens/Screen.java#L135 - return mTransitioning ? PointerEvents.NONE : PointerEvents.AUTO;
+ return PointerEvents.AUTO; Which, fixes the issue for screens that are not the "home" screen. Issue still occurs when trying to navigate from HomeScreen (see demo app) EDIT 2: boooyahhh I found it #61 (comment) |
Hey @kmagiera hope you're keeping well given the current circumstances! Just wondering if you've had time to look into this? |
Hey! Sorry, not yet, but I saw your repo and looks like it is something that would help investigate the issue. The comment about changing pointer events is helpful too and thank you for purchasing the solution, however the events checks where added there on purpose and I need to think a little bit more about what kind of consequences that change could have |
No problem at all, I appreciate you have a lot to do already without this. |
Closing this in favor of #624, where the logic of disabling interactions has been changed. Feel free to comment if something is wrong. |
@WoLewicki I don't think #624 resolved this.
I'm still getting the exact behavior as described in this issue - Interactions are not enabled briefly after animating to a screen. |
#624 has not resolved the issue for me either. Anyone knows how to solve this? The library is amazing but having touch event delays bugs me |
You can check #775 and see if it is what you would like to have in your library. Please keep in mind that it introduces the ability to interact with screens that are transitioning. |
@WoLewicki which might be an issue for others. Should this be editable using a prop? |
We came to the conclusion that we should not disable interaction during transition. If you want to have this controlled by the native side, you should use |
@WoLewicki I'm not sure I'm completely following. |
I confirm I get an interaction delay while using that import too |
If you want the user interaction controlled by the system, which means no interaction during transition just how in native iOS apps, you should use |
@WoLewicki By using Also, the behavior with |
I use react-native-screens + createNativeStackNavigator + enable screens and I experience this delay too. This is especially noticeable when navigating back and for to a formSheet screen. On native there is no delay whatsoever. I would love to help but have no idea where to start from. I wonder what the root cause of this delay is 🤔 |
@bartzy this Library is not only for native-stack users but also for regular react navigation users who want benefits, native navigation containers and less memory consumption due to the view detaching when activating this library (eg enableScreens()). The PR indeed fixes the interaction delay for users importing "stack" but not for us folks, using "native-stack". (Which rocks and always outperform the js stack) Native stack still has a slight but pretty annoying touch rejection after a transition. If you open a form sheet and want to scroll inside of it or even when you close and want to use any pointer after it (menu, tab bar, scrolling) you will always end up "trying again", because the first touch is ignored when happened immediately. Reminds me of old CSS and focus bugs. The interaction delay is actually a pretty big UX issue and I doubt that this is anything system related or native. It feels like the system is kinda locked after a push:pop/dismiss for ~300-500ms @WoLewicki maybe my explanations brings some light into the dark |
@hirbod so does it only happen in modals, or in all presentation kinds? Also, could you somehow show the difference in the time of the ability to click, scroll in the next/previous screen when native-stack compared to e.g. |
@WoLewicki I can confirm everything you said. Same delay when using native Apps like "Settings" or the presentation modals inside the So from what I can confirm in my "quick tests" is that native-screens indeed does not add some additional interaction delay on top of it. So let's change the question: can we reduce that block time? I have no clue if there is an API for it, but if yes, could we make it configurable? |
@WoLewicki @hirbod |
@bartzy I also feel this. It feels like it occurs much more often in my React app than in other native apps. Here are some videos. I filmed with a second phone so you can see my finger interactions. Modal issues Tab bar Push/Pop |
@hirbod great videos, thanks! @WoLewicki do you have any thoughts on this perhaps? |
@hirbod thanks very much for the videos! Can you add videos of using the same concepts in |
The link is not working, can you provide new links, or tell what they did in that video, I am experiencing a delay in response right after navigating to screen which is behind current screen, whenever I got back, and click again on search bar or navigation menu, ui dont responsed for 0.5 to 1.5 seconds ( my predictions ). I am using stack navigator inside a drawer navigator. |
Our team has been doing some experimentation with
useScreens
in react-navigation. One thing I noticed was the time it takes for a screen to respond to touch events seems longer with react-native-screens enabled. Purely anecdotal, but trying to nav back and forth between screens pretty consistently takes 1 extra quick tap withuseScreens
compared to not using it.Seeking feedback if this could be react-native-screens specific, the implementation in react-navigation, or possibly something in our own app.
The text was updated successfully, but these errors were encountered: