[Pkg-mozext-commits] [tabmixplus] 08/23: Ctrl-Tab - tabs list responds to the mouse – not working on Mac

David Prévot taffit at moszumanska.debian.org
Wed Feb 17 18:34:00 UTC 2016


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

taffit pushed a commit to branch master
in repository tabmixplus.

commit 23efd3dbd9df36ed3452a74fa1b47a5de6819c8b
Author: onemen <tabmix.onemen at gmail.com>
Date:   Sat Feb 13 17:04:10 2016 +0200

    Ctrl-Tab - tabs list responds to the mouse – not working on Mac
---
 chrome/content/flst/lasttab.js | 21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)

diff --git a/chrome/content/flst/lasttab.js b/chrome/content/flst/lasttab.js
index b720909..9f2b2d9 100644
--- a/chrome/content/flst/lasttab.js
+++ b/chrome/content/flst/lasttab.js
@@ -21,7 +21,6 @@ var TMP_LastTab = {
   _inited: false,
 
   DisplayTabList: function() {
-    var element = document.documentElement;
     var tablist = this.TabList;
 
     TabmixAllTabs.createCommonList(tablist, this.handleCtrlTab ? 3 : 2);
@@ -29,18 +28,14 @@ var TMP_LastTab = {
     item.setAttribute("_moz-menuactive", "true");
     TabmixAllTabs.updateMenuItemActive(null, item);
 
-    // show offscreen to get popup measurements
-    tablist.showPopup(element, -element.boxObject.screenX, 10000, "popup", null, null);
-    var width = tablist.boxObject.width;
-    var height = tablist.boxObject.height;
-    this.SuppressTabListReset = true;
-    tablist.hidePopup();
-    this.SuppressTabListReset = false;
-
-    // show at the center of the screen
-    tablist.openPopupAtScreen(screen.availLeft + (screen.availWidth - width) / 2,
-                              screen.availTop + (screen.availHeight - height) / 2,
-                              false);
+    // show the list at the center of the screen
+    let box = tablist.boxObject;
+    let letf = () => screen.availLeft + (screen.availWidth - box.width) / 2;
+    let top = () => screen.availTop + (screen.availHeight - box.height) / 2;
+    tablist.style.visibility = "hidden";
+    tablist.openPopupAtScreen(letf(), top(), true);
+    tablist.moveTo(letf(), top());
+    tablist.style.visibility = "";
 
     var ietab = "chrome://ietab/content/reloaded.html?url=";
     if (gBrowser.currentURI.spec.startsWith(ietab))

-- 
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