Skip to content

Fix Escape cancel on pre-record toolbar#299

Draft
rv4no wants to merge 2 commits into
duongductrong:masterfrom
rv4no:fix/pre-record-esc-cancel
Draft

Fix Escape cancel on pre-record toolbar#299
rv4no wants to merge 2 commits into
duongductrong:masterfrom
rv4no:fix/pre-record-esc-cancel

Conversation

@rv4no

@rv4no rv4no commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • make the pre-record toolbar a non-activating key panel so it can receive Escape without stealing app focus
  • handle Escape/cancelOperation directly in pre-record mode and route it through the existing cancel callback

Verification

  • xcodebuild -project Snapzy.xcodeproj -scheme Snapzy -destination 'platform=macOS' -skipPackagePluginValidation CODE_SIGNING_ALLOWED=NO build\n\n## Notes\n- no local build artifacts, debug app bundles, zip files, or packaging-only changes are included

@duongductrong

Copy link
Copy Markdown
Owner

Hey @rv4no,

Thanks for your effort. I've been testing the improvement of this PR. First of all, I can't press interacting pre-record toolbar anymore

@rv4no

rv4no commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

@duongductrong Good catch. I had mainly tested the app/window selection path, where this did not reproduce. The issue was in manual region selection: the crop overlay and pre-record toolbar coexist, and the overlay could keep stealing interaction/focus.

Updated the fix so the toolbar reliably receives clicks/Escape, re-fronts after overlay creation, and pre-record cancel cleans up immediately when idle. Added focused regression tests for toolbar clickability/window style and Escape cancel.

@rv4no
rv4no marked this pull request as draft June 29, 2026 16:30
@rv4no

rv4no commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

Updated:

Current fix is still a bit shaky. So I'll keep it draft for now.

The root issue is that the pre-record toolbar can be visible but not actually key/frontmost after area selection, because the previously active app may regain focus. That makes Esc unreliable and can also cause the first click on the toolbar to miss.

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.

3 participants