[network/kaidan/Kaidan/0.16] src/qml: GlobalDrawer: Fix maintaining focused items on closing

Melvin Keskin <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit a078e3ac44b0644563d2648d5db0e6df45c4227a by Melvin Keskin.
Committed on 21/07/2026 at 21:40.
Pushed by melvo into branch 'Kaidan/0.16'.

GlobalDrawer: Fix maintaining focused items on closing

M  +2    -2    src/qml/GlobalDrawer.qml

https://invent.kde.org/network/kaidan/-/commit/a078e3ac44b0644563d2648d5db0e6df45c4227a

diff --git a/src/qml/GlobalDrawer.qml b/src/qml/GlobalDrawer.qml
index 2b8f36bbf..f0d1da3e9 100644
--- a/src/qml/GlobalDrawer.qml
+++ b/src/qml/GlobalDrawer.qml
@@ -567,9 +567,9 @@ Kirigami.GlobalDrawer {
 			const focusedItem = applicationWindow().activeFocusItem
 
 			// Update root.lastFocusedItem to become any focused item outside of GlobalDrawer.
-			// "!root.handle.visibleChildren.includes(focusedItem)" is used to filter out the drawer handle.
+			// "!(focusedItem instanceof IconButton)" is used to filter out the drawer handle.
 			// "focusedItem !== root.lastFocusedItem" avoids setting root.lastFocusedItem twice for the same item.
-			if (!root.handle.visibleChildren.includes(focusedItem) && !root.drawerOpen && focusedItem !== root.lastFocusedItem && !lastFocusedItemCached) {
+			if (!(focusedItem instanceof IconButton) && !root.drawerOpen && focusedItem !== root.lastFocusedItem && !root.lastFocusedItemCached) {
 				root.lastFocusedItem = focusedItem
 			}
 		}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.