WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
282137
[Navigation] NavigationResult.finished resolves earlier than expected
https://bugs.webkit.org/show_bug.cgi?id=282137
Summary
[Navigation] NavigationResult.finished resolves earlier than expected
Patrick Griffis
Reported
2024-10-26 10:10:26 PDT
An example of this is in the navigation-api/focus-reset/ tests, such as basic.html. It includes the JS file navigation-api/focus-reset/resources/helpers.mjs which has code like: const { committed, finished } = navigation.navigate("#foo"); await committed; assert_equals(document.activeElement, button, "Focus stays on the button during the transition"); await finished.catch(() => {}); assert_equals(document.activeElement, button, "Focus stays on the button after the transition"); The issue is that the navigation blocks all the way until the point where `finished` is fulfilled. The `committed` promise is resolved at the correct time, however the JS after it is not able to execute until after the navigation is complete (by which point `finished` has been resolved also).
Attachments
Add attachment
proposed patch, testcase, etc.
Rob Buis
Comment 1
2024-10-28 05:12:08 PDT
I looked a bit into this, I think this is the same problem shown by some ordering-and-transition tests, in some cases the waitForAll algorithm returns too quickly. Basically the waitForAll functionality should act like a Promise, which is currently not the case.
Rob Buis
Comment 2
2024-10-30 09:55:56 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/35946
EWS
Comment 3
2024-10-31 06:35:22 PDT
Committed
285951@main
(144f09fb32d5): <
https://commits.webkit.org/285951@main
> Reviewed commits have been landed. Closing PR #35946 and removing active labels.
Radar WebKit Bug Importer
Comment 4
2024-10-31 06:36:14 PDT
<
rdar://problem/138996263
>
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