Merge pull request #486 from vincentbernat/fix/anchor-load

embed: do not jump to unrelated anchor on load
This commit is contained in:
Benoît Latinier 2018-10-09 09:29:00 +02:00 committed by GitHub
commit dfbc80d5b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,7 +71,8 @@ require(["app/lib/ready", "app/config", "app/i18n", "app/api", "app/isso", "app/
isso.insert_loader(rv, lastcreated); isso.insert_loader(rv, lastcreated);
} }
if (window.location.hash.length > 0) { if (window.location.hash.length > 0 &&
window.location.hash.match("^#isso-[0-9]+$")) {
$(window.location.hash).scrollIntoView(); $(window.location.hash).scrollIntoView();
} }
}, },