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:
15 files changed
+300
-5
No files matched your search
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user