NEW257736
When mouse/trackpad click on WKWebView dismisses a UIKit popover, web gets pointerdown/up events with type "touch" not "mouse"
https://bugs.webkit.org/show_bug.cgi?id=257736
Summary When mouse/trackpad click on WKWebView dismisses a UIKit popover, web gets po...
Kurt Revis
Reported 2023-06-05 18:33:59 PDT
Created attachment 466597 [details] Xcode project to demonstrate the bug We have a UIKit app containing a WKWebView, with buttons that show a UIKit popover above the web view. When we show a popover, then dismiss it by clicking with mouse/trackpad on the web view, the web view sees a PointerEvent with pointerType “touch”, even though no touch is involved. It should be “mouse”. Steps: 1. Run attached project on iPad with a mouse or trackpad attached, or in the simulator. 2. Using any input method, press the “Popover” button to show a popover. 3. Using mouse or trackpad, click and release, outside the popover, on the web view. Expected: - The web view prints “pointerdown mouse” and “pointerup mouse”. Actual: - The web view prints “pointerdown touch” and “pointerup touch”. - Subsequent clicks work as expected. Notes: The bug happens on iPadOS 15, 16, and 17 developer beta 1. Both on device and in the simulator. The sample app demonstrates two different bugs — see the explanatory text when you run the app. This is “Bug #1”. In the test app, there is a native gesture recognizer above the web view, that does nothing but observe touches and log them to the console. It sees touches with type `.indirectPointer` as expected. So the problem is likely to be in WebKit. Also filed as Apple Feedback FB12229984.
Attachments
Xcode project to demonstrate the bug (170.60 KB, application/zip)
2023-06-05 18:33 PDT, Kurt Revis
no flags
Radar WebKit Bug Importer
Comment 1 2023-06-06 16:39:11 PDT
Note You need to log in before you can comment on or make changes to this bug.