WebUI: Prevent default action of links

This prevents anchors from being added to the URL.
This commit is contained in:
Gabriele 2014-12-14 10:00:00 +01:00
parent 2023ec043c
commit 76999b598c
2 changed files with 7 additions and 6 deletions

View file

@ -114,6 +114,7 @@ var ContextMenu = new Class({
/* menu items */
this.menu.getElements('a').each(function(item) {
item.addEvent('click', function(e) {
e.preventDefault();
if (!item.hasClass('disabled')) {
this.execute(item.get('href').split('#')[1], $(this.options.element));
this.fireEvent('click', [item, e]);