Repository navigation
Conversation
A sheet modal that is dismissed while a breakpoint move is animating can have its gesture re-enabled after dismiss destroyed it. The pointer callbacks are already cleared at that point, so every later touch or mouse down on the reused wrapper throws "pointerDown is not a function". Keep track of destroy in createPointerEvents so enable(true) does not add listeners again once the gesture is destroyed. closes ionic-team#31786 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@aliassar is attempting to deploy a commit to the Ionic Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue number: resolves #31786
What is the current behavior?
If a sheet modal is dismissed while a breakpoint move is still animating, the move's finish callback calls
gesture.enable(true)afterdismiss()has already destroyed the gesture.destroy()clears the pointer callbacks, butenable(true)still adds thetouchstartandmousedownlisteners back. An inline modal reuses the wrapper, so after the next present every touch on the sheet throwspointerDown is not a function.What is the new behavior?
createPointerEventsremembers that it was destroyed, andenable(true)does nothing afterdestroy().enable(true)runs afterdestroy().Does this introduce a breaking change?
Other information
I ran the reproduction from the issue against a local dev build in headless Chrome with touch on (390x844), tapping the sheet 3 times after the second present. In iOS mode each tap threw
pointerDown is not a functionbefore the change and nothing after it, and dragging the re-presented sheet still moved it from 0.4 to 1. MD mode doesn't hit this because its shorter leave animation destroys the move animation before the move finishes.