From 229124d85e43749c7c38eb7eddf97d103d1824d7 Mon Sep 17 00:00:00 2001 From: Eduardo Morales Date: Wed, 16 Dec 2020 18:55:03 +0100 Subject: [PATCH] Event run twice on click and on mouse up. --- inheritlink.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inheritlink.js b/inheritlink.js index 5da3741..d453987 100644 --- a/inheritlink.js +++ b/inheritlink.js @@ -49,7 +49,7 @@ if (hideElement) { $(first).hide(); } - $(link_element).on("mouseup click",function(e) { + $(link_element).on("click",function(e) { if (!$(e.target).is(first) && !$(e.target).is(linkSelector)) { // Left: 1, middle: 2, right 3. switch (e.which) {