Also don't check for moved topics on fragments starting with !/

Similar reasoning for our existing filter on just `/`; it's only really
used in state routing.

Bug: T361322
Change-Id: Ibcf1a58a884b953003012640041471d3bb5c9450
This commit is contained in:
David Lynch 2024-03-28 18:26:51 -05:00
parent f3df3dfa0a
commit ebc884e217

View file

@ -599,9 +599,9 @@ function init( $container, state ) {
) {
var fragment = location.hash.slice( 1 );
var ignorePatterns = [
// A leading '/' usually means a application route, e.g. /media, or /editor.
// A leading '/' or '!/' usually means a application route, e.g. /media, or /editor.
// We can't rule out a heading title (T349498), but they are unlikely
/^\//,
/^!?\//,
// "top" is a magic value in the WHATWG spec that goes to the top of the
// document (unless there's an actual id=top element on the page), see:
// https://html.spec.whatwg.org/multipage/browsing-the-web.html#scrolling-to-a-fragment:top-of-the-document-2