@@ -116,7 +116,14 @@ FocusScope {
116116 if ((flags & ignoreHideIfMouseOverLauncher) && Utils.Functions.itemUnderMouse(panel)) {
117117 return;
118118 }
119− switchToNextState("")
119+ if (root.lockedVisible) {
120+ // Due to binding updates when switching between modes
121+ // it could happen that our request to show will be overwritten
122+ // with a hide request. Rewrite it when we know hiding is not allowed.
123+ switchToNextState("visible")
124+ } else {
125+ switchToNextState("")
126+ }
120127 }
121128
122129 function fadeOut() {
@@ -255,13 +262,6 @@ FocusScope {
255262 interval: 1
256263 property string nextState: ""
257264 onTriggered: {
258− if (root.lockedVisible && nextState == "") {
259− // Due to binding updates when switching between modes
260− // it could happen that our request to show will be overwritten
261− // with a hide request. Rewrite it when we know hiding is not allowed.
262− nextState = "visible"
263− }
264−
265265 // switching to an intermediate state here to make sure all the
266266 // values are restored, even if we were already in the target state
267267 root.state = "tmp"
@@ -380,8 +380,7 @@ FocusScope {
380380 }
381381
382382 Keys.onEscapePressed: {
383− switchToNextState("");
384− root.focus = false;
383+ root.hide()
385384 }
386385
387386 onDragDistanceChanged: {