fix(qt): preserve navigation shortcuts and release text input focus

Keep search, settings and link shortcuts usable while editing, dismiss focus on outside clicks and navigation, and guard deferred focus against hidden inputs. Add Qt Quick regression coverage.

Refs #753

cx
This commit is contained in:
vicrodh committed 2026-09-08 21:40:28 -06:00
1 parent bc6a795980
commit 0e76c1f486
15 files changed
+300 -5

No files matched your search

+6
View File
@@ -152,6 +152,12 @@ Rectangle {
// only what it owns. Shared controls accept their Space/Enter events
// before they bubble here; in particular a focused Settings toggle owns
// Space, so toggling it cannot also trigger global play/pause (§4.1).
InputFocusDismiss { id: inputFocusDismiss }
Connections {
target: QbzShell
function onCurrentViewChanged() { inputFocusDismiss.dismiss() }
}
Keys.onPressed: function (event) {
var w = root.Window.window
var afi = w !== null ? w.activeFocusItem : null
+6
View File
@@ -583,6 +583,12 @@ Rectangle {
// central text-input gate (hotkeys_bridge.rs:295-299) is the counterpart
// of the first guard. The textInputFocused predicate is computed exactly
// as the desktop shell computes it (AppShell.qml:91).
InputFocusDismiss { id: inputFocusDismiss }
Connections {
target: QbzShell
function onCurrentViewChanged() { inputFocusDismiss.dismiss() }
}
Keys.onPressed: function (event) {
var w = root.Window.window
var afi = w !== null ? w.activeFocusItem : null