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

setFocus doesnt work when touch screen is enabled for webassembly

    XMLWordPrintable

Details

    • WebAssembly

    Description

      i should be able to use "setFocus" for a widget to give it keyboard focus. however, this does not seem to work for webassembly if a touch screen is connected and enabled on my computer. to reproduce compile the attached with qt 6.7.2 with webassembly. this has a "set focus" button. run the application without touchscreen (on windows use device manager to disable HID touch devices and quit browser), click into the textedit to verify that you can enter text. click the "set Focus" button. you can enter text. now enable touchscreen again (on windows and restart the browser and launch the textedit app. first click into the textedit to confirm that you can enter text. then click "set Focus". focus is lost. you actually have to click into the window to get the keyboard focus to the textedit. this is very bad.

      in our application we rely on being able to set the focus to widgets programmatically, our app is almost unusable when a touchscreen is connected as the user has to click into each widget to be able to enter text.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lopotter-ext Lorn Potter
            andres.kruse Andres Kruse
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes