Skip to content

fix(ui): prevent background sync from stealing focus when modal overlays are active - #215

Merged
icyleaf merged 1 commit into
developfrom
fix/212-modal-focus-stealing
Oct 14, 2026
Merged

icyleaf merged 1 commit into
developfrom
fix/212-modal-focus-stealing

Conversation

@icyleaf

@icyleaf icyleaf commented Oct 14, 2026

Copy link
Copy Markdown
Owner

Closes #212

Summary of Changes

  • Unified Modal Overlay Guard: Introduced hasActiveModal property combining visibility of showActionPalette, showSshKeyModal, and showPasswordHistoryModal.
  • Focus Stealing Prevention: Guarded background process completion callbacks (authStatusProc, vaultSyncProc, vaultListProc) so that focus restoration to the search field is inhibited while any modal is active.
  • Shortcut & Key Navigation Protection: Guarded window-level Keys.onPressed and Shortcut handlers with hasActiveModal to prevent shortcut leakage during modal text editing.
  • Testing: Added tests/tst_modal_focus.qml with 100% test coverage.

Verification

  • qml6 tests/tst_modal_focus.qml: ALL PASSED
  • qml6 tests/tst_card_formatting.qml: ALL PASSED
  • qml6 tests/tst_lock_cleanup.qml: ALL PASSED

…ays are active

- Unify modal overlay visibility tracking into hasActiveModal
- Inhibit search field focus restoration during authStatusProc, vaultSyncProc, and vaultListProc callbacks while any modal is active
- Guard global Shortcuts and imperative Keys.onPressed handlers with hasActiveModal to prevent background shortcut leakage during modal editing
- Ensure restoreSearchFocus on modal close only executes when no other modal remains active
- Add regression test in tests/tst_modal_focus.qml

Fixes #212
@icyleaf
icyleaf merged commit ce672e6 into develop Oct 14, 2026
3 checks passed
@icyleaf
icyleaf deleted the fix/212-modal-focus-stealing branch October 14, 2026 13:53
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.

1 participant