-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Navigation: navigate to a fragment updates the navigation api for same-document navigation twice. #9826
Comments
Notes so far:
I was hoping we could go an alternate route where we keep the "update the navigation API entries for a same-document navigation" inside "navigate to a fragment", but move it before "update document for history step application". I think this fails, because events fired by "update the navigation API entries for a same-document navigation" would observe the old |
What is the issue with the HTML Standard?
In navigate to a fragment, the following steps happen:
Step 13 then calls update document for history step application
My reading of the steps followed in update for history step application is like so:
documentIsNew will be false. This is a fragment navigation, so the document has already been loaded and populated with an initial session history entry.
document's latest entry will be the page we are navigating from, so documentsEntryChanged will be true.
skipping ahead to step 5.5.1, since documentsEntryChanged is true and documentIsNew is false:
This is very suspicious, because this is not a traverse, it is a push or replace.
Inside update the navigation api entries for a same document navigation we get to step 3, which checks for "traverse".
The assertion in step 3.2 fails, unless we have previously navigated to this fragment.
Later in navigate to a fragment, step 14 calls update the navigation api entries for a same document navigation with the correct "push" or "reload" state change.
At the end of the navigate to a fragment algorithm we end up finalize a same-document navigation, which ends up calling apply the history step, with the
fireNavigateEventOnCommit
argument set to false. I have a hard time following the path through that algorithm that we are supposed to take for fragment navigations though, and whether the fact that that argument is ignored is ok? We have already fired our navigate event in step 3 of navigate to a fragment, so it should not be fired by apply the history step.The text was updated successfully, but these errors were encountered: