Don't navigate on links meant to execute javascript on click.

Signed-off-by: Michael Price <loneviking72@gmail.com>
This commit is contained in:
Michael Price
2018-03-12 03:01:38 -04:00
committed by Roberto Rosario
parent 43955d680a
commit cffc63a29e

View File

@@ -115,9 +115,19 @@ PartialNavigation.prototype.onAnchorClick = function ($this, event) {
return true;
}
if (url.indexOf('javascript:;') > -1) {
// Ignore links meant to execute javascript on click.
return true;
}
if (url === '#') {
// Ignore links with hash at the.
return true;
}
event.preventDefault();
if ((url !== '#') && !($this.hasClass('disabled') || $this.parent().hasClass('disabled'))) {
if (!($this.hasClass('disabled') || $this.parent().hasClass('disabled'))) {
this.setLocation(url);
}
}