From da6ea2b69bddb3bed613153d831d2b6d0bcb2c79 Mon Sep 17 00:00:00 2001 From: derv82 Date: Wed, 6 Dec 2017 01:40:39 -0800 Subject: [PATCH] 'Customize' button stops propagation & opens tab. --- popup/search-results.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/popup/search-results.js b/popup/search-results.js index e4618b74..f4a05d1d 100755 --- a/popup/search-results.js +++ b/popup/search-results.js @@ -364,9 +364,12 @@ // Style has customizations installButton.classList.add('customize'); const customizeButton = $('.searchResult-customize', entry); + customizeButton.dataset.href = searchAPI.BASE_URL + userstyleSearchResult.url; customizeButton.classList.remove('hidden'); - customizeButton.href = searchAPI.BASE_URL + userstyleSearchResult.url; - customizeButton.onclick = handleEvent.openURLandHide; + customizeButton.onclick = event => { + event.stopPropagation(); + handleEvent.openURLandHide.call(customizeButton, event); + }; } /** Installs the current userstyleSearchResult into stylus. */