mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 01:13:25 +01:00
Fix scrolling in mobile view sidebar not working
This commit is contained in:
parent
5cf63cc45e
commit
188334d647
@ -31,7 +31,7 @@ export class tapAndSwipe {
|
||||
static readonly _default : TapAndSwipeOptionsType = {
|
||||
threshold : 10,
|
||||
tapHoldThreshold : 3000,
|
||||
allowScrolling : null,
|
||||
allowScrolling : 'both',
|
||||
swipe : function(){},
|
||||
tap : function(){},
|
||||
tapAndHold: function(){}
|
||||
@ -125,9 +125,9 @@ export class tapAndSwipe {
|
||||
this._isTapAndHold = false;
|
||||
this._fingercount = event.touches.length;
|
||||
|
||||
if(event.path)
|
||||
if(event.composedPath())
|
||||
{
|
||||
const scrolledItem = event.path.filter(_item => {
|
||||
const scrolledItem = event.composedPath().filter(_item => {
|
||||
return _item instanceof HTMLElement && this.element.contains(_item) && (_item.scrollTop != 0 || _item.scrollLeft !=0);
|
||||
});
|
||||
if (scrolledItem.length>0)
|
||||
@ -140,8 +140,6 @@ export class tapAndSwipe {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
this._tapHoldTimeout = window.setTimeout(_=>{
|
||||
this._isTapAndHold = true;
|
||||
//check scrolling
|
||||
|
@ -81,15 +81,17 @@ import {tapAndSwipe} from "../../api/js/tapandswipe";
|
||||
$baseDiv.css('overflow-y','auto');
|
||||
break;
|
||||
case "left":
|
||||
if (distance >= 10)
|
||||
if (distance >= 200)
|
||||
{
|
||||
framework.toggleMenu();
|
||||
}
|
||||
|
||||
break;
|
||||
case "right":
|
||||
if (distance >= 200)
|
||||
{
|
||||
framework.toggleMenu();
|
||||
}
|
||||
}
|
||||
},
|
||||
allScrolling: 'vertical'
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user