mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 17:04:14 +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,14 +81,16 @@ 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":
|
||||
framework.toggleMenu();
|
||||
if (distance >= 200)
|
||||
{
|
||||
framework.toggleMenu();
|
||||
}
|
||||
}
|
||||
},
|
||||
allScrolling: 'vertical'
|
||||
|
Loading…
Reference in New Issue
Block a user