[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [torbutton/maint-1.9.5] Bug 19689: Plugin prompt is parented to wrong window
commit f5fa0465dfa666b0bdbfc7e1d0cc51be68680245
Author: Kathy Brade <brade@xxxxxxxxxxxxxxxxx>
Date: Fri Jul 15 11:46:20 2016 -0400
Bug 19689: Plugin prompt is parented to wrong window
When displaying the "Are you sure you want to enable plugins?" prompt,
always use the top-most browser window as the parent window. This avoids
problems caused by using the Privacy and Security Settings dialog, which
is closing, as the parent.
---
src/chrome/content/torbutton.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js
index 539bd88..eb73b8c 100644
--- a/src/chrome/content/torbutton.js
+++ b/src/chrome/content/torbutton.js
@@ -710,7 +710,10 @@ function torbutton_confirm_plugins() {
var askAgainText = torbutton_get_property_string("torbutton.popup.never_ask_again");
var askAgain = {value: false};
- var no_plugins = (prompts.confirmEx(null, "", message, flags, null, null, null,
+ var wm = Cc["@mozilla.org/appshell/window-mediator;1"]
+ .getService(Components.interfaces.nsIWindowMediator);
+ var win = wm.getMostRecentWindow("navigator:browser");
+ var no_plugins = (prompts.confirmEx(win, "", message, flags, null, null, null,
askAgainText, askAgain) == 1);
m_tb_prefs.setBoolPref("extensions.torbutton.confirm_plugins", !askAgain.value);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits