Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.7.2
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.