X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=www%2Fjssrc%2Fblerg%2FLink.js;h=d4b9aec5405f6297e75c61204185ebed28d374aa;hb=HEAD;hp=b2468bf6dd12ddee8b6f3efa1cf450bed6485798;hpb=13ce437d1c9120ac0813abbbf7602097e7ac14dc;p=blerg.git diff --git a/www/jssrc/blerg/Link.js b/www/jssrc/blerg/Link.js index b2468bf..d4b9aec 100644 --- a/www/jssrc/blerg/Link.js +++ b/www/jssrc/blerg/Link.js @@ -1,25 +1,27 @@ enyo.kind({ - name: "blerg.Link", - kind: "Control", - tag: "a", - published: { - href: "#", - }, - handlers: { - onclick: "muteLink", - }, - create: function() { - this.inherited(arguments); - this.hrefChanged(); - }, - hrefChanged: function() { - this.setAttribute('href', this.href); - }, - muteLink: function(inSender, inEvent) { - inEvent.preventDefault(); - if (this.href != '#') - location.href = this.href; - this.bubble('onNavigate'); - return true; - } + name: "blerg.Link", + kind: "Control", + tag: "a", + published: { + href: "#", + }, + handlers: { + onclick: "muteLink", + }, + create: function() { + this.inherited(arguments); + this.hrefChanged(); + }, + hrefChanged: function() { + this.setAttribute('href', this.href); + }, + muteLink: function(inSender, inEvent) { + if (inEvent.which > 1) + return; + inEvent.preventDefault(); + if (this.href != '#') + location.href = this.href; + this.bubble('onNavigate'); + return true; + } });