[Libreoffice-commits] online.git: loleaflet/js
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Nov 17 08:33:11 UTC 2018
loleaflet/js/jquery.mCustomScrollbar.js | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
New commits:
commit 657076d6207bc141572381a918785fbd8fd733f3
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Thu Nov 15 18:59:08 2018 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Sat Nov 17 09:32:54 2018 +0100
Awful but effective hack that seems to fix the jumping after touch gestures
(Only for mobile devices for now. I am not brave enough to do it also
for mobile device browsers using a normal Online.)
Likely breaks rendering of the scroll bars somewhat.
Change-Id: I40bf1cb29fc99ba808b8bb570691d96019a1f8f7
Reviewed-on: https://gerrit.libreoffice.org/63437
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Tested-by: Tor Lillqvist <tml at collabora.com>
diff --git a/loleaflet/js/jquery.mCustomScrollbar.js b/loleaflet/js/jquery.mCustomScrollbar.js
index 38cc715af..f280a6e1c 100644
--- a/loleaflet/js/jquery.mCustomScrollbar.js
+++ b/loleaflet/js/jquery.mCustomScrollbar.js
@@ -2112,7 +2112,9 @@ and dependencies (minified).
onStart:function(){
if(options.callbacks && options.onStart && !d.tweenRunning){
/* callbacks: onScrollStart */
- if(_cb("onScrollStart")){_mcs(); o.callbacks.onScrollStart.call(el[0]);}
+ if(!window.ThisIsAMobileApp){
+ if(_cb("onScrollStart")){_mcs(); o.callbacks.onScrollStart.call(el[0]);}
+ }
d.tweenRunning=true;
_onDragClasses(mCSB_dragger);
d.cbOffsets=_cbOffsets();
@@ -2120,7 +2122,9 @@ and dependencies (minified).
},onUpdate:function(){
if(options.callbacks && options.onUpdate){
/* callbacks: whileScrolling */
- if(_cb("whileScrolling")){_mcs(); o.callbacks.whileScrolling.call(el[0]);}
+ if(!window.ThisIsAMobileApp){
+ if(_cb("whileScrolling")){_mcs(); o.callbacks.whileScrolling.call(el[0]);}
+ }
}
},onComplete:function(){
if(options.callbacks && options.onComplete){
@@ -2128,9 +2132,11 @@ and dependencies (minified).
var t=mCSB_container[0].idleTimer || 0;
mCSB_container[0].onCompleteTimeout=setTimeout(function(){
/* callbacks: onScroll, onTotalScroll, onTotalScrollBack */
- if(_cb("onScroll")){_mcs(); o.callbacks.onScroll.call(el[0]);}
- if(_cb("onTotalScroll") && scrollTo[1]>=limit[1]-totalScrollOffset && d.cbOffsets[0]){_mcs(); o.callbacks.onTotalScroll.call(el[0]);}
- if(_cb("onTotalScrollBack") && scrollTo[1]<=totalScrollBackOffset && d.cbOffsets[1]){_mcs(); o.callbacks.onTotalScrollBack.call(el[0]);}
+ if(!window.ThisIsAMobileApp){
+ if(_cb("onScroll")){_mcs(); o.callbacks.onScroll.call(el[0]);}
+ if(_cb("onTotalScroll") && scrollTo[1]>=limit[1]-totalScrollOffset && d.cbOffsets[0]){_mcs(); o.callbacks.onTotalScroll.call(el[0]);}
+ if(_cb("onTotalScrollBack") && scrollTo[1]<=totalScrollBackOffset && d.cbOffsets[1]){_mcs(); o.callbacks.onTotalScrollBack.call(el[0]);}
+ }
d.tweenRunning=false;
mCSB_container[0].idleTimer=0;
_onDragClasses(mCSB_dragger,"hide");
More information about the Libreoffice-commits
mailing list