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. ClosedApplication.png
          ClosedApplication.png
          27 kB
        2. ClosingIssue.mp4
          7.72 MB
        3. secondviewbug.tar.gz
          2 kB
        4. Typed.png
          Typed.png
          108 kB
        5. TypedWithSubview.png
          TypedWithSubview.png
          110 kB
        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