forked from Shinonome/dots-hyprland
Fix case with unfocusable dismissables
This commit is contained in:
@@ -53,8 +53,8 @@ Singleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function hasActive(element) {
|
function hasActive(element) {
|
||||||
return element.activeFocus || Array.from(
|
return element?.activeFocus || Array.from(
|
||||||
element.children
|
element?.children
|
||||||
).some(
|
).some(
|
||||||
(child) => hasActive(child)
|
(child) => hasActive(child)
|
||||||
);
|
);
|
||||||
@@ -62,7 +62,7 @@ Singleton {
|
|||||||
|
|
||||||
HyprlandFocusGrab {
|
HyprlandFocusGrab {
|
||||||
id: grab
|
id: grab
|
||||||
windows: root.dismissable.some(w => hasActive(w.contentItem)) ? [...root.dismissable, ...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
|
active: root.dismissable.length > 0
|
||||||
onCleared: () => {
|
onCleared: () => {
|
||||||
root.dismiss();
|
root.dismiss();
|
||||||
|
|||||||
Reference in New Issue
Block a user