[Pkg-mozext-commits] [tabmixplus] 08/48: Calculating scrolledToEnd in _updateScrollButtonsDisabledState can be not accurate when there are more than 2 rows, last tab bottom and scrollbox bottom can differ by less than a pixel

David Prévot taffit at moszumanska.debian.org
Sun Aug 20 03:14:35 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 2557a7dc62298a501587734166378e4d0ea3af71
Author: onemen <tabmix.onemen at gmail.com>
Date:   Tue Jul 4 23:08:35 2017 +0300

    Calculating scrolledToEnd in _updateScrollButtonsDisabledState can be not accurate when there are more than 2 rows, last tab bottom and scrollbox bottom can differ by less than a pixel
---
 chrome/content/tab/scrollbox.xml | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/chrome/content/tab/scrollbox.xml b/chrome/content/tab/scrollbox.xml
index 0d3b87e..555b79e 100644
--- a/chrome/content/tab/scrollbox.xml
+++ b/chrome/content/tab/scrollbox.xml
@@ -236,6 +236,17 @@
               'this._isRTLScrollbox',
               '$& && !this.isMultiRow'
             )._replace(
+              'if (leftOrTopElement',
+              `if (this.isMultiRow) {
+                  if (leftOrTopElement &&
+                      leftOrTopEdge(leftOrTopElement) >= leftOrTopEdge(this._scrollbox) + scrollboxPaddingLeft) {
+                    scrolledToStart = true;
+                  } else if (rightOrBottomElement &&
+                             rightOrBottomEdge(rightOrBottomElement) <= rightOrBottomEdge(this._scrollbox) - scrollboxPaddingRight + 2) {
+                    scrolledToEnd = true;
+                  }
+                } else $&`,
+            )._replace(
               'if (scrolledToEnd) {',
               'let box = document.getElementById("tabmixScrollBox");' + $LF +
               '  Tabmix.setItem(box, "scrolledtoend", scrolledToEnd || null);' + $LF +

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