[Pkg-mozext-commits] [tabmixplus] 33/48: Don’t scroll the tabbar in multi-row mode from scrollbox.ensureElementIsVisible when the tab is already visible

David Prévot taffit at moszumanska.debian.org
Sun Aug 20 03:14:37 UTC 2017


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

taffit pushed a commit to branch master
in repository tabmixplus.

commit b808896188e3ce411d35c29003973e23be5d598a
Author: onemen <tabmix.onemen at gmail.com>
Date:   Mon Aug 14 15:53:43 2017 +0300

    Don’t scroll the tabbar in multi-row mode from scrollbox.ensureElementIsVisible when the tab is already visible
---
 chrome/content/tab/scrollbox.xml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/chrome/content/tab/scrollbox.xml b/chrome/content/tab/scrollbox.xml
index bce51b6..ef33022 100644
--- a/chrome/content/tab/scrollbox.xml
+++ b/chrome/content/tab/scrollbox.xml
@@ -185,6 +185,14 @@
                   this._scrollbox.scrollLeft;
               },
             });
+
+            Tabmix.changeCode(this, "scrollbox.ensureElementIsVisible")._replace(
+              'element.scrollIntoView',
+              `if (this.isMultiRow && Tabmix.tabsUtils.isElementVisible(element)) {
+                 return;
+               }
+               $&`
+            ).toCode();
           } else {
             Tabmix.changeCode(this, "scrollbox.ensureElementIsVisible")._replace(
               'var amountToScroll',

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