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

Subview steals focus breaking input method

    XMLWordPrintable

Details

    • Android

    Description

      When there is another view shown ontop of Qt's QtQuick scene it steals focus from the main view, breaking back button handling (ie. Keys won't work, an event filter on qApp still does) and text field input. A text field cannot be focused and the keyboard will not open. As soon as the second view hides, everything returns to normal.

      Compile the attached example with Qt 5.9, check the "Window visible" checkbox and try typing into the text field. It won't work. On Qt 5.8 this worked fine.

      This effectively breaks Qt WebView which just lays a native view ontop of the QtQuick scene and potentially others, such as advertisement SDKs.

      I tried calling clearFocus on the view, experimented with WindowDoesNotAcceptFocus (not implemented on Android), requestActivate and various other means to keep the other view from stealing focus but none of them worked.

      Attachments

        1. secondviewbug.tar.gz
          2 kB
        2. ClosedApplication.png
          ClosedApplication.png
          27 kB
        3. Typed.png
          Typed.png
          108 kB
        4. TypedWithSubview.png
          TypedWithSubview.png
          110 kB
        5. ClosingIssue.mp4
          7.72 MB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            pekkagehor Pekka Gehör
            broulik Kai Uwe Broulik
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes