Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-61581

QtQuickControls2 Drawer doesn't close if tapped outside



    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.9.2
    • 5.9.0
    • Quick: Controls 2
    • None
    • OSX 10.12.5
      Qt 5.9
      QtCreator 4.3
      Android 6.0.1
      iOS 10.3.2
      Xcode 8.3.3

      bug appears on Android and iOS but is working by mouse click on macOS
    • e841c0a252099778fcaa01593592a6b92844e04d


      under 5.8 opening the Drawer I always could close the Drawer by tapping outside of the Drawer

      under 5.9 the (opened) Drawer looks the same (space outside Drawer is dimmed),

      but tapping outside doesn't always close the Drawer.

      sometimes after some taps, sometimes never, sometimes immediately

      under iOS I'm getting this after opening the Drawer by dragging:

      {{stale focus object QQuickStackView_QML_26(0x17013b080) , doing manual update}}

      and this after some taps outside drawer if I was able to close the Drawer:

      {{stale focus object QQuickPopupItem(0x17022d4e0) , doing manual update}}
      {{stale focus object QQuickRootItem(0x17002e700) , doing manual update}}

      under Android no output like this

      on MacOS clicking with Mouse works, so it's a touch problem

      I verified comparing QtQuickControls2 Gallery APP from 5.8: tap outside Drawer closes Drawer,  Gallery from 5.9: tap outside doesn't close the Drawer

      tried explicitely setting modal true or some other close policies, but Drawer wasn't closed reliable

      while the Drawer cannot be closed tapping outside, the tap event goes through to the underlying Page and so user can hit a Button by accident.

      Found a (ugly looking) workaround and inserted a fake Popup between Drawer and underlying StackView Pages. Now user cannot tap on Buttons from Pages below, but unfortunately also cannot "see" the content below. couldn't figure out a way to make this fake Popup transparent


      Drawer {
          id: myDrawer
          z: 1
          // workaround:
          onOpened: {
          onAboutToHide: {
          Popup {
              id: fakePopup
              z: 0
              width: appWindow.width
              height: appWindow.height
          // end workaround


        Issue Links

          For Gerrit Dashboard: QTBUG-61581
          # Subject Branch Project Status CR V



              Unassigned Unassigned
              ekkescorner Ekkehard
              0 Vote for this issue
              4 Start watching this issue



                Gerrit Reviews

                  There are no open Gerrit changes