WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
312719
test_driver.click() cannot target elements in popup windows opened via window.open()
https://bugs.webkit.org/show_bug.cgi?id=312719
Summary
test_driver.click() cannot target elements in popup windows opened via window...
klee
Reported
2026-04-19 06:43:02 PDT
testdriver-vendor.js implements test_driver.click() using eventSender, which operates in the main test window's coordinate space. When test_driver.click() is called on an element in a popup window opened via window.open(), eventSender cannot target the element because it does not handle the popup window's coordinate space. This causes the click to not reach the intended element, resulting in test timeouts. Affected WPT tests include those that use cross-window test_driver.click(), such as html/user-activation/navigate-to-sameorigin.html from whatwg/html#11454. - WPT test case:
https://github.com/web-platform-tests/wpt/blob/master/html/user-activation/navigate-to-sameorigin.html
- "Sticky User Activation Carry-Over" Spec PR:
https://github.com/whatwg/html/pull/11454
Attachments
Add attachment
proposed patch, testcase, etc.
klee
Comment 1
2026-04-21 07:45:02 PDT
Here's the result of running 'navigate-to-sameorigin.html' wpt test case. - macOS:
https://ews-build.s3-us-west-2.amazonaws.com/macOS-Sequoia-Release-WK2-Tests-EWS/7afd2b82-20990/imported/w3c/web-platform-tests/html/user-activation/navigate-to-sameorigin-actual.txt
- WPE:
https://ews-build.s3-us-west-2.amazonaws.com/WPE-WK2-Tests-EWS/7afd2b82-122059/imported/w3c/web-platform-tests/html/user-activation/navigate-to-sameorigin-actual.txt
klee
Comment 2
2026-04-21 18:20:37 PDT
I'm looking into this. The root cause is that eventSender in WebKitTestRunner always dispatches events to mainWebView(), even when test_driver.click() is called on an element in a popup window. The script message from the popup does carry frame/page info via WKScriptMessageGetFrameInfo / WKFrameInfoGetPage, so it should be possible to route the event to the correct view's backend. Still investigating.
klee
Comment 3
2026-04-23 08:47:40 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/63430
Radar WebKit Bug Importer
Comment 4
2026-04-26 06:43:10 PDT
<
rdar://problem/175621915
>
EWS
Comment 5
2026-05-01 05:56:55 PDT
Committed
312424@main
(75e2fd9ca577): <
https://commits.webkit.org/312424@main
> Reviewed commits have been landed. Closing PR #63430 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug