mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-01 15:18:06 +00:00
LibWeb: Update document url after same-document back/forward navigation
Seems like a specification bug, but other browsers update url before popstate event is fired and so should we. Fixes back/forward navigation on GitHub.
This commit is contained in:
parent
08aaf4fb07
commit
23d683cf6b
Notes:
sideshowbarker
2024-07-17 17:49:11 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: 23d683cf6b
Pull-request: https://github.com/SerenityOS/serenity/pull/24052
3 changed files with 8 additions and 3 deletions
|
@ -4070,6 +4070,9 @@ void Document::update_for_history_step_application(JS::NonnullGCPtr<HTML::Sessio
|
|||
|
||||
// 5. If documentIsNew is false, then:
|
||||
if (!document_is_new) {
|
||||
// NOTE: Not in the spec, but otherwise document's url won't be updated in case of a same-document back/forward navigation.
|
||||
set_url(entry->url());
|
||||
|
||||
// AD HOC: Skip this in situations the spec steps don't account for
|
||||
if (update_navigation_api) {
|
||||
// 1. Update the navigation API entries for a same-document navigation given navigation, entry, and "traverse".
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue