-
-
Notifications
You must be signed in to change notification settings - Fork 491
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
Interaction not disabled on previous screen until slightly after transition #134
Comments
is anyone seeing that this problem is still happening? I have exactly the same problem, i have list view and clicking element pushing new screen to stack, and while transition is happening I can click on any place on the screen and it will trigger action from previous screen. just tested that without calling |
Does the issue still exist in the newest version? If so, can you provide a repo with minimal configuration showing the issue? |
I will be updating deps next week in my app, so will check and post update here. |
The updateContainer method has logic to disable interaction during screen transitions, but it doesn't seem to work. I can still tap on buttons from the previous screen both during the transition and for a brief moment afterwards. Grainy GIF below, test app here.
Here's the pseudocode of
updateContainer
as I understand it:I noticed that only screens that were already active (i.e. the screen is currently active and was already in
_activeScreens
) are detached and have their user interaction disabled. Here's what I observe stepping through that method when a new screen is pushed. There are 4 calls toupdateContainer
, and the animated transition occurs between calls 3 and 4:So, during the transition, the second screen's user interaction is enabled, disabled, and enabled again. Notice that the user interaction for the first screen is never changed. That said, if I observe the actual value of
userInteractionEnabled
for the two screens' corresponding UIViews at the start and end ofupdateContainer
, I see wildly different things. The first screen always starts enabled, and is disabled by the end of the method. The second screen is usually enabled throughout, except for the fourth/final call, when it starts out disabled and ends up enabled. So clearly there are some side effects going on somewhere that I'm missing.In any case, the result is that I can still tap on buttons in the previous screen both during the transition and for a brief moment afterward. At some point, possibly during or after the fourth call to
updateContainer
, something gestures to stop being triggered on the first screen, and enables them on the second screen, but it takes longer than it should (probably related to the delay people are seeing here).The text was updated successfully, but these errors were encountered: