Fix overview search field and right sidebar losing focus (#2838)

This commit is contained in:
Minh
2026-02-07 08:49:34 +01:00
committed by GitHub
4 changed files with 12 additions and 4 deletions
@@ -52,9 +52,17 @@ Singleton {
}
}
function hasActive(element) {
return element?.activeFocus || Array.from(
element?.children
).some(
(child) => hasActive(child)
);
}
HyprlandFocusGrab {
id: grab
windows: [...root.persistent, ...root.dismissable]
windows: root.dismissable.every(w => !w?.focusable) || root.dismissable.some(w => hasActive(w?.contentItem)) ? [...root.dismissable, ...root.persistent] : [...root.dismissable]
active: root.dismissable.length > 0
onCleared: () => {
root.dismiss();