Skip to content

Fix custom map button with Touch screen lock unreachable after locking - #5733

Open
EugeneZmeuk wants to merge 3 commits into
masterfrom
fix/multi-action-lock-screen-button-unreachable
Open

Fix custom map button with Touch screen lock unreachable after locking#5733
EugeneZmeuk wants to merge 3 commits into
masterfrom
fix/multi-action-lock-screen-button-unreachable

Conversation

@EugeneZmeuk

Copy link
Copy Markdown
Member

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 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, 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:

  • Device / Simulator: iPhone 15 Pro Simulator
  • iOS: 26.5 (simulator runtime)

Scenarios

  • Reproduced the bug on master: configured a custom button with "Open - Search view" as action 1 and "Lock screen" as action 2, tapped it, then tapped "Lock screen" from the sheet. Tapping the same button again (or the hamburger menu, or zoom) did nothing at all, screen fully unresponsive.
  • Rebuilt with the fix and repeated the exact same scenario: tapping the button while locked reopens the actions sheet (with the padlock icon now showing "unlocked"), tapping "Lock screen" in it fully unlocks, and the map, hamburger menu, and zoom all respond again immediately.
  • Different profiles tested
  • Localization / RTL checked
  • VoiceOver / Accessibility checked
  • CarPlay checked
  • Android parity checked - Android's LockGestureDetector.getPressedLockAction() already scans all of a button's actions (not just the first), so it is not affected by this bug
  • Performance impact checked

AI disclaimer

Implementation:

  • Tool / Agent: Claude Code
  • Model: Claude Sonnet 5
    Prompts used (summarised):
  1. Investigate a Reddit bug report (iPhone map custom action button + lock screen) and confirm whether it's real by reproducing it in the iOS Simulator.
  2. Once confirmed and root-caused, implement a fix, open a GitHub issue with the root cause and a PR, then check whether the Android app has the same bug.
    Decided by the agent, not requested explicitly:
  • The second, architecture-level fix (searching from self.superview instead of self) 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

EugeneZmeuk and others added 3 commits September 5, 2026 17:01
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Touch screen lock leaves the app fully stuck (must force-quit) when a custom button's Lock Screen action isn't first

2 participants