Index: composer.postload.js |
diff --git a/composer.postload.js b/composer.postload.js |
index c5d6ade73a687a52a1341575b0924d2c3decd61f..2a5d1666aca1f22a4af216f4bfa1bcd9b1eee2b8 100644 |
--- a/composer.postload.js |
+++ b/composer.postload.js |
@@ -441,12 +441,12 @@ function stopPickingElement() |
/* Core logic */ |
// We're done with the block element feature for now, tidy everything up. |
-function deactivateBlockElement() |
+function deactivateBlockElement(popupAlreadyClosed) |
{ |
if (currentlyPickingElement) |
stopPickingElement(); |
- if (blockelementPopupId != null) |
+ if (blockelementPopupId != null && !popupAlreadyClosed) |
{ |
browser.runtime.sendMessage({ |
type: "forward", |
@@ -456,10 +456,9 @@ function deactivateBlockElement() |
type: "composer.dialog.close" |
} |
}); |
- |
- blockelementPopupId = null; |
} |
+ blockelementPopupId = null; |
lastRightClickEvent = null; |
if (currentElement) |
@@ -546,7 +545,7 @@ function initializeComposer() |
// Apply added element hiding filters. |
elemhide.apply(); |
} |
- deactivateBlockElement(); |
+ deactivateBlockElement(!!message.popupAlreadyClosed); |
break; |
case "composer.content.clearPreviousRightClickEvent": |
if (!lastRightClickEventIsMostRecent) |
@@ -566,7 +565,8 @@ function initializeComposer() |
type: "forward", |
payload: |
{ |
- type: "composer.content.finished" |
+ type: "composer.content.finished", |
+ popupAlreadyClosed: true |
Manish Jethani
2018/02/20 11:17:30
We could just call this "dialogClosed" (instead of
kzar
2018/02/20 11:56:44
FWIW I prefer popupAlreadyClosed so I went with th
Manish Jethani
2018/02/20 12:33:25
Sounds good, thanks.
|
} |
}); |
} |