[Pkg-mozext-commits] [tabmixplus] 18/22: Check both scrollSize and tabstrip innerbox height to determine if the scrolled is at the end
David Prévot
taffit at moszumanska.debian.org
Sat Aug 5 15:28:35 UTC 2017
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to tag 0.5.0.4pre.170625a1
in repository tabmixplus.
commit dfcb535b4d7c35715b71e96f1691df56d518f6eb
Author: onemen <tabmix.onemen at gmail.com>
Date: Wed Jun 21 13:39:26 2017 +0300
Check both scrollSize and tabstrip innerbox height to determine if the scrolled is at the end
---
chrome/content/tab/scrollbox.xml | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/chrome/content/tab/scrollbox.xml b/chrome/content/tab/scrollbox.xml
index 56b80ea..c63e3f5 100644
--- a/chrome/content/tab/scrollbox.xml
+++ b/chrome/content/tab/scrollbox.xml
@@ -216,8 +216,8 @@
// when theme or extension add negative margin-bottom to the tab or
// tab content the scrollHeight can be larger than the actual
// inner-box height
- 'this.scrollSize',
- 'this.tabmixScrollSize'
+ 'this.scrollClientSize + this.scrollPosition == this.scrollSize',
+ 'this.isScrolledToEnd'
)._replace(
/(})(\)?)$/,
' var box = document.getElementById("tabmixScrollBox");\n' +
@@ -331,13 +331,16 @@
]]></getter>
</property>
- <property name="tabmixScrollSize" readonly="true">
+ <property name="isScrolledToEnd" readonly="true">
<getter><![CDATA[
+ let scrollPosition = this.scrollClientSize + this.scrollPosition;
if (this.orient == "vertical" && this.isMultiRow) {
const height = this.innerbox.getBoundingClientRect().height;
- return Math.round(height);
+ if (scrollPosition == Math.round(height)) {
+ return true;
+ }
}
- return this.scrollSize;
+ return scrollPosition == this.scrollSize;
]]></getter>
</property>
--
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