| Summary: | Events bypass child window and go to main window | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-kirigami | Reporter: | george fb <georgefb899> |
| Component: | general | Assignee: | kdelibs bugs <kdelibs-bugs-null> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | normal | CC: | kde, nate, notmart |
| Priority: | NOR | ||
| Version First Reported In: | 6.19.0 | ||
| Target Milestone: | Not decided | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
STEPS TO REPRODUCE 1. run demo app 2. press down arrow key OBSERVED RESULT action in MAIN window is triggered EXPECTED RESULT action in CHILD window is triggered SOFTWARE/OS VERSIONS Operating System: openSUSE Tumbleweed 20251024 KDE Plasma Version: 6.5.0 KDE Frameworks Version: 6.19.0 Qt Version: 6.10.0 Kernel Version: 6.17.4-1-default (64-bit) Graphics Platform: Wayland >When the child window is open,
There is no child window in your example code, only another page within the same window.
From what I can see this is working as expected and is an application bug.
pushDialogLayer opens the page in a window. This also happens with the file dialog window. https://bugs.kde.org/show_bug.cgi?id=508877 (arrow keys were also not working) https://invent.kde.org/multimedia/haruna/-/merge_requests/91 ๐๐งน โ ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME. For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging. Thank you for helping us make KDE software even better for everyone! ๐๐งน This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME. |
If the main window and the child window both have an Action with the same shortcut, then the Action in the main window is triggered, even if the child window is focused. Here's a demo app showcasing this ``` import QtQuick import QtQuick.Controls import org.kde.kirigami as Kirigami Kirigami.ApplicationWindow { id: window width: 800 height: 800 visible: true title: qsTr("Hello World") Component.onCompleted: window.pageStack.pushDialogLayer(page1, {}) Component { id: page1 Kirigami.Page { id: p1 Action { shortcut: 'Escape' onTriggered: p1.closeDialog() } Shortcut { sequences: [ "down" ] onActivated: console.log("down") } } } Action { shortcut: 'Escape' onTriggered: console.log(1111) } Action { shortcut: 'down' onTriggered: console.log(2222) } } ``` When the child window is open, pressing down, regardless how many time, only triggers the main window Action. When pressing escape, first it triggers the main window Action, then the Action in the window opened by pushDialogLayer.