diff --git a/components/mobileshell/qml/actiondrawer/ActionDrawer.qml b/components/mobileshell/qml/actiondrawer/ActionDrawer.qml index cbe4228a..8c38d9b8 100644 --- a/components/mobileshell/qml/actiondrawer/ActionDrawer.qml +++ b/components/mobileshell/qml/actiondrawer/ActionDrawer.qml @@ -169,8 +169,15 @@ Item { root.state = ""; } + Keys.onEscapePressed: { + if (intendedToBeVisible) { + close(); + } + } + function open() { cancelAnimations(); + forceActiveFocus(); if (openToPinnedMode) { root.state = "open"; // go to pinned height } else { diff --git a/components/mobileshell/qml/actiondrawer/ActionDrawerWindow.qml b/components/mobileshell/qml/actiondrawer/ActionDrawerWindow.qml index 9be9ff0d..a774e184 100644 --- a/components/mobileshell/qml/actiondrawer/ActionDrawerWindow.qml +++ b/components/mobileshell/qml/actiondrawer/ActionDrawerWindow.qml @@ -27,7 +27,7 @@ Window { LayerShell.Window.anchors: LayerShell.Window.AnchorTop | LayerShell.Window.AnchorLeft | LayerShell.Window.AnchorRight | LayerShell.Window.AnchorBottom LayerShell.Window.layer: LayerShell.Window.LayerOverlay LayerShell.Window.exclusionZone: -1 - LayerShell.Window.keyboardInteractivity: LayerShell.Window.KeyboardInteractivityNone + LayerShell.Window.keyboardInteractivity: drawer.intendedToBeVisible ? LayerShell.Window.KeyboardInteractivityExclusive : LayerShell.Window.KeyboardInteractivityNone /** * The ActionDrawer component.