Commit 49d28849 authored by Mike Greiling's avatar Mike Greiling

limit body click selector to tags with a hash target

parent 5fe5f33d
......@@ -90,9 +90,9 @@
Cookies.defaults.path = gon.relative_url_root || '/';
// `hashchange` is not triggered when link target is already in window.location
$body.on('click', 'a', function() {
$body.on('click', 'a[href^="#"]', function() {
var href = this.getAttribute('href');
if (href && href.indexOf('#') === 0 && href.substr(1) === gl.utils.getLocationHash()) {
if (href.substr(1) === gl.utils.getLocationHash()) {
setTimeout(gl.utils.handleLocationHash, 1);
}
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment