Bug 511284 - Events bypass child window and go to main window
Summary: Events bypass child window and go to main window
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 6.19.0
Platform: Other Linux
: NOR normal
Target Milestone: Not decided
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-28 19:39 UTC by george fb
Modified: 2025-11-28 03:46 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description george fb 2025-10-28 19:39:06 UTC
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.
Comment 1 george fb 2025-10-28 19:41:45 UTC
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
Comment 2 David Edmundson 2025-10-29 22:00:57 UTC
>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.
Comment 3 george fb 2025-10-29 22:46:56 UTC
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
Comment 4 Bug Janitor Service 2025-11-13 03:47:35 UTC
๐Ÿ›๐Ÿงน โš ๏ธ 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!
Comment 5 Bug Janitor Service 2025-11-28 03:46:17 UTC
๐Ÿ›๐Ÿงน This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.