fix: prevent backdrop click-through in iOS home screen apps (#12056) (CP: 25.2) - #12062
Merged
Merged
Conversation
When the app-layout drawer is open as an overlay on iOS home screen (standalone) apps, tapping the backdrop to close the drawer also triggers a click on the element behind the backdrop. The backdrop already calls `preventDefault()` on `touchend` to stop the synthesized "ghost" click. This works in Safari tabs, but iOS does not honor it in standalone (home screen) apps. Because closing the drawer makes the backdrop stop capturing pointer events, the ghost click then reaches the element behind it. ## Reproduction 1. Open the app-layout demo on iOS and add it to the home screen. 2. Launch it from the home screen and open the drawer. 3. Tap the backdrop over an interactive element (e.g. a button). The drawer closes and the element behind also receives the click. Only reproduces in the installed app, and only for medium-length taps (roughly 300–1000 ms). ## Changes - In standalone mode only, swallow the upcoming ghost click at the tap position in the capture phase, so regular mouse, keyboard, and touch clicks elsewhere are never affected. The listener is removed after a short timeout and on disconnect. - Fix an unrelated pre-existing leak: `disconnectedCallback` removed the `close-overlay-drawer` listener with the wrong function reference. Fixes #11690 --- 🤖 Generated with Claude Code
|
DiegoCardoso
approved these changes
Jul 9, 2026
Collaborator
Author
|
This ticket/PR has been released with Vaadin 25.2.3. |
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.



This PR cherry-picks changes from the original PR #12056 to branch 25.2.
Original PR description