Fix custom map button with Touch screen lock unreachable after locking - #5733
Open
EugeneZmeuk wants to merge 3 commits into
Open
Fix custom map button with Touch screen lock unreachable after locking#5733EugeneZmeuk wants to merge 3 commits into
EugeneZmeuk wants to merge 3 commits into
Conversation
A custom map action button can hold several quick actions. When "Lock screen" was configured as anything other than the first action (or triggered from the multi-action sheet), the touch-passthrough allowlist check in isTouchEventAllowedForView: only ever inspected quickActions.firstObject, so it never recognized the button as the one allowed to unlock. Combined with an asymmetry in OAUserInteractionPassThroughView's hitTest: (the "no allowed view found" branch does not convert a self-hit into nil the way the unlocked path does), the button search also started from the wrong view - the quick-action buttons are added to this view's superview, not to the view itself - so even a single-action Lock Screen button could never be found. Once locked, the full-screen overlay swallowed every touch with no reachable escape, leaving force-quitting the app as the only way out. Fix both issues: scan all of a button's quick actions instead of only the first one, and start the allowed-view search from the button container (self.superview) where the quick-action buttons actually live. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XFNYCMYhhS9fYseDTdbc1P
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.
Related issue / task
Fixes #5732
Summary
A custom map action button can hold several quick actions. When "Lock screen" was configured as anything other than the first action (or triggered from the multi-action sheet), the touch-passthrough allowlist check in
isTouchEventAllowedForView:only ever inspectedquickActions.firstObject, so it never recognized the button as the one allowed to unlock. Combined with an asymmetry inOAUserInteractionPassThroughView'shitTest:(the "no allowed view found" branch does not convert a self-hit into nil the way the unlocked path does), the button search also started from the wrong view: the quick-action buttons are added to this view's superview, not to the view itself, confirmed with a live lldb dump of the view hierarchy, so even a single-action Lock Screen button could never be found. Once locked, the full-screen overlay swallowed every touch with no reachable escape, leaving force-quitting the app as the only way out.This PR fixes both issues: scans all of a button's quick actions instead of only the first one, and starts the allowed-view search from the button container (
self.superview) where the quick-action buttons actually live.Testing
Tested on:
Scenarios
LockGestureDetector.getPressedLockAction()already scans all of a button's actions (not just the first), so it is not affected by this bugAI disclaimer
Implementation:
Prompts used (summarised):
Decided by the agent, not requested explicitly:
The second, architecture-level fix (searching from
self.superviewinstead ofself) was found by attaching lldb to the running Simulator process and dumping the live view hierarchy, after the first, narrower fix (scanning all quick actions instead of only the first) turned out to be insufficient on its own.Final review:
Tool / Agent: Claude Code
Model: Claude Sonnet 5
Final diff reviewed
Significant findings: None beyond what's documented in the linked issue.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XFNYCMYhhS9fYseDTdbc1P