From 12d1c8ce830aacb42c39e8702936286c984724a2 Mon Sep 17 00:00:00 2001 From: Zach Hoffman Date: Wed, 23 Oct 2024 15:42:58 +0000 Subject: [PATCH] Do not dispatch popstate or hashchange when hasRef changes. This behavior was already agreed upon in , but bug 1544428 was an implementation edge case needing to be fixed. An exception is when the fragment contains a directive, in which case a difference in `hasRef` is sufficient, to retain existing behavior WRT directives. Although bug 1544428 is about popstate, hashchange was erroneously being dispatched, as well, which this patch fixes. Some tests that depended on the old behavior are updated. Differential Revision: https://phabricator.services.mozilla.com/D225567 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1544428 gecko-commit: 80bb463edec5a6e91258e1d507196255c60070f4 gecko-reviewers: jjaschke, dom-core, sessionstore-reviewers, dao, farre --- .../history-traversal/hash-empty-string.html | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 html/browsers/browsing-the-web/history-traversal/hash-empty-string.html diff --git a/html/browsers/browsing-the-web/history-traversal/hash-empty-string.html b/html/browsers/browsing-the-web/history-traversal/hash-empty-string.html new file mode 100644 index 00000000000000..e17c77ef6fb409 --- /dev/null +++ b/html/browsers/browsing-the-web/history-traversal/hash-empty-string.html @@ -0,0 +1,31 @@ + + + + + + + +