[Pkg-mozext-commits] [tabmixplus] 25/44: Workaround for Firefox 17-21, event.stopImmediatePropagation prevent the call to contentAreaClick

David Prévot taffit at moszumanska.debian.org
Wed Oct 15 02:10:03 UTC 2014


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

taffit pushed a commit to branch master
in repository tabmixplus.

commit 3425ccadc1c9b5f21449893c9be0ec78456ee18d
Author: onemen <tabmix.onemen at gmail.com>
Date:   Sun Oct 12 17:54:08 2014 +0300

    Workaround for Firefox 17-21, event.stopImmediatePropagation prevent the call to contentAreaClick
---
 modules/ContentClick.jsm | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/modules/ContentClick.jsm b/modules/ContentClick.jsm
index 8cf4cbe..04427d1 100644
--- a/modules/ContentClick.jsm
+++ b/modules/ContentClick.jsm
@@ -36,9 +36,6 @@ this.TabmixContentClick = {
 
   contentLinkClick: function(event, browser, focusedWindow) {
     ContentClickInternal.contentLinkClick(event, browser, focusedWindow);
-    if (event.__hrefFromOnClick)
-      event.stopImmediatePropagation();
-    ContentClickInternal.resetData();
   },
 
   isGreasemonkeyInstalled: function(window) {
@@ -387,12 +384,25 @@ let ContentClickInternal = {
     return ["default at 17"];
   },
 
+  contentLinkClick: function(event, browser, focusedWindow) {
+    this._contentLinkClick(event, browser, focusedWindow);
+    if (event.__hrefFromOnClick) {
+      if (TabmixSvc.version(220))
+        event.stopImmediatePropagation();
+      else {
+        event.stopPropagation();
+        browser.ownerDocument.defaultView.contentAreaClick(event);
+      }
+    }
+    this.resetData();
+  },
+
   /**
    * @brief For non-remote browser:
    *        handle left-clicks on links when preference is to open new tabs from links
    *        links that are not handled here go on to the page code and then to contentAreaClick
    */
-  contentLinkClick: function(aEvent, aBrowser, aFocusedWindow) {
+  _contentLinkClick: function(aEvent, aBrowser, aFocusedWindow) {
     aEvent.tabmix_isRemote = aBrowser.getAttribute("remote") == "true";
     if (aEvent.tabmix_isRemote)
       return "1";

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git



More information about the Pkg-mozext-commits mailing list