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

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

GlobalDrawer: Fix maintaining focused items on closing

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

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

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.