[Pkg-mozext-commits] [adblock-plus-element-hiding-helper] 405/483: Don't remove menu items until the menu is definitely hidden, don't assume that there is only one

David Prévot taffit at moszumanska.debian.org
Thu Jan 22 21:42:01 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository adblock-plus-element-hiding-helper.

commit dc06703fa3818affd9864687501920992ea5eed6
Author: Wladimir Palant <trev at adblockplus.org>
Date:   Thu Feb 2 07:29:06 2012 +0100

    Don't remove menu items until the menu is definitely hidden, don't assume that there is only one
---
 windowWrapper.js | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/windowWrapper.js b/windowWrapper.js
index 7757f52..e268ec1 100644
--- a/windowWrapper.js
+++ b/windowWrapper.js
@@ -26,7 +26,7 @@ function WindowWrapper(wnd, elementMarkerClass)
   this.window = wnd;
 
   this.popupShowingHandler = this.popupShowingHandler.bind(this);
-  this.popupHidingHandler = this.popupHidingHandler.bind(this);
+  this.popupHiddenHandler = this.popupHiddenHandler.bind(this);
   this.keyPressHandler = this.keyPressHandler.bind(this);
   this.toggleSelection = this.toggleSelection.bind(this);
   this.hideTooltips = this.hideTooltips.bind(this);
@@ -54,7 +54,7 @@ WindowWrapper.prototype =
   init: function()
   {
     this.window.addEventListener("popupshowing", this.popupShowingHandler, false);
-    this.window.addEventListener("popuphiding", this.popupHidingHandler, false);
+    this.window.addEventListener("popuphidden", this.popupHiddenHandler, false);
     this.window.addEventListener("keypress", this.keyPressHandler, false);
     this.window.addEventListener("blur", this.hideTooltips, true);
   },
@@ -62,7 +62,7 @@ WindowWrapper.prototype =
   shutdown: function()
   {
     this.window.removeEventListener("popupshowing", this.popupShowingHandler, false);
-    this.window.removeEventListener("popuphiding", this.popupHidingHandler, false);
+    this.window.removeEventListener("popuphidden", this.popupHiddenHandler, false);
     this.window.removeEventListener("keypress", this.keyPressHandler, false);
     this.window.removeEventListener("blur", this.hideTooltips, true);
   },
@@ -105,14 +105,14 @@ WindowWrapper.prototype =
     popup.insertBefore(item, insertBefore);
   },
 
-  popupHidingHandler: function(event)
+  popupHiddenHandler: function(event)
   {
     let popup = event.target;
     if (!/^(abp-(?:toolbar|status|menuitem)-)popup$/.test(popup.id))
       return;
 
     let items = popup.getElementsByClassName("elemhidehelper-item");
-    if (items.length)
+    while (items.length)
       items[0].parentNode.removeChild(items[0]);
   },
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus-element-hiding-helper.git



More information about the Pkg-mozext-commits mailing list