Fix beastify code (#505)

* Fix blank page bug when clicking popup background
This commit is contained in:
Talal
2022-12-13 20:00:24 +00:00
committed by GitHub
parent 6d8f07243a
commit a8c3fcf80d

View File

@@ -65,6 +65,10 @@ function listenForClicks() {
* Get the active tab,
* then call "beastify()" or "reset()" as appropriate.
*/
if (e.target.tagName !== "BUTTON" || !e.target.closest("#popup-content")) {
// Ignore when click is not on a button within <div id="popup-content">.
return;
}
if (e.target.type === "reset") {
browser.tabs.query({active: true, currentWindow: true})
.then(reset)