Cleanup & travis (should break)
This commit is contained in:
@@ -54,23 +54,21 @@ var linkAction = function(el, event) {
|
||||
}
|
||||
|
||||
module.exports = function(el) {
|
||||
var instance = this
|
||||
var that = this
|
||||
|
||||
on(el, "click", function(event) {
|
||||
linkAction.call(instance, el, event)
|
||||
linkAction.call(that, el, event)
|
||||
})
|
||||
|
||||
on(el, "keyup", function(event) {
|
||||
|
||||
// Don’t break browser special behavior on links (like page in new window)
|
||||
if (event.which > 1 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) {
|
||||
el.setAttribute(attrKey, "modifier")
|
||||
return
|
||||
}
|
||||
|
||||
if(event.keyCode == 13) {
|
||||
linkAction.call(instance, el, event)
|
||||
if (event.keyCode == 13) {
|
||||
linkAction.call(that, el, event)
|
||||
}
|
||||
|
||||
}.bind(this))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user