summaryrefslogtreecommitdiffstats
path: root/application/palemoon/base/content/tabbrowser.xml
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-04-29 08:13:02 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-04-29 08:13:02 +0200
commitcd296c598a587b58a0e2a579c9be5aa255669829 (patch)
treec56fdbcc7e7e7b88c52c113a0d25835a3db61269 /application/palemoon/base/content/tabbrowser.xml
parent722cc9091631e6b9a87964fd98559b7356d559f2 (diff)
downloadUXP-cd296c598a587b58a0e2a579c9be5aa255669829.tar
UXP-cd296c598a587b58a0e2a579c9be5aa255669829.tar.gz
UXP-cd296c598a587b58a0e2a579c9be5aa255669829.tar.lz
UXP-cd296c598a587b58a0e2a579c9be5aa255669829.tar.xz
UXP-cd296c598a587b58a0e2a579c9be5aa255669829.zip
[PALEMOON] Prevent overlapping modal prompts and preserve prompt order.
Diffstat (limited to 'application/palemoon/base/content/tabbrowser.xml')
-rw-r--r--application/palemoon/base/content/tabbrowser.xml10
1 files changed, 9 insertions, 1 deletions
diff --git a/application/palemoon/base/content/tabbrowser.xml b/application/palemoon/base/content/tabbrowser.xml
index d9366f488..6555d3071 100644
--- a/application/palemoon/base/content/tabbrowser.xml
+++ b/application/palemoon/base/content/tabbrowser.xml
@@ -402,11 +402,18 @@
let promptBox = {
appendPrompt : function(args, onCloseCallback) {
let newPrompt = document.createElementNS(XUL_NS, "tabmodalprompt");
- stack.appendChild(newPrompt);
+ // stack.appendChild(newPrompt);
+ stack.insertBefore(newPrompt, browser.nextSibling);
browser.setAttribute("tabmodalPromptShowing", true);
newPrompt.clientTop; // style flush to assure binding is attached
+ let prompts = this.listPrompts();
+ if (prompts.length > 1) {
+ // Let's hide ourself behind the current prompt.
+ newPrompt.hidden = true;
+ }
+
let tab = self._getTabForContentWindow(browser.contentWindow);
newPrompt.init(args, tab, onCloseCallback);
return newPrompt;
@@ -418,6 +425,7 @@
let prompts = this.listPrompts();
if (prompts.length) {
let prompt = prompts[prompts.length - 1];
+ prompt.hidden = false;
prompt.Dialog.setDefaultFocus();
} else {
browser.removeAttribute("tabmodalPromptShowing");