@@ -120,7 +120,14 @@ FocusScope {
123+ if (root.lockedVisible) {
124+ // Due to binding updates when switching between modes
125+ // it could happen that our request to show will be overwritten
126+ // with a hide request. Rewrite it when we know hiding is not allowed.
127+ switchToNextState("visible")
123− switchToNextState("")
129+ switchToNextState("")
126 function fadeOut() {
133 function fadeOut() {
@@ -258,13 +265,6 @@ FocusScope {
258 interval: 1
265 interval: 1
259 property string nextState: ""
266 property string nextState: ""
260 onTriggered: {
267 onTriggered: {
261− if (root.lockedVisible && nextState == "") {
262− // Due to binding updates when switching between modes
263− // it could happen that our request to show will be overwritten
264− // with a hide request. Rewrite it when we know hiding is not allowed.
265− nextState = "visible"
268 // switching to an intermediate state here to make sure all the
268 // switching to an intermediate state here to make sure all the
269 // values are restored, even if we were already in the target state
269 // values are restored, even if we were already in the target state
270 root.state = "tmp"
270 root.state = "tmp"
@@ -383,8 +383,7 @@ FocusScope {
385 Keys.onEscapePressed: {
385 Keys.onEscapePressed: {
386− switchToNextState("");
386+ root.hide()
390 onDragDistanceChanged: {
389 onDragDistanceChanged: {