mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-07 03:12:33 +01:00
Fix swipe right to exit zapper/picker on touch displays
Regression from:
- d23f9c6a8b
This commit is contained in:
parent
218f774ba0
commit
05893a6c16
@ -301,7 +301,6 @@ const onSvgTouch = (( ) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( startX === undefined ) { return; }
|
if ( startX === undefined ) { return; }
|
||||||
if ( ev.cancelable === false ) { return; }
|
|
||||||
const stopX = ev.changedTouches[0].screenX;
|
const stopX = ev.changedTouches[0].screenX;
|
||||||
const stopY = ev.changedTouches[0].screenY;
|
const stopY = ev.changedTouches[0].screenY;
|
||||||
const angle = Math.abs(Math.atan2(stopY - startY, stopX - startX));
|
const angle = Math.abs(Math.atan2(stopY - startY, stopX - startX));
|
||||||
@ -329,7 +328,9 @@ const onSvgTouch = (( ) => {
|
|||||||
if ( swipeRight === false && angle < Math.PI - angleUpperBound ) {
|
if ( swipeRight === false && angle < Math.PI - angleUpperBound ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if ( ev.cancelable ) {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
|
}
|
||||||
// Swipe left.
|
// Swipe left.
|
||||||
if ( swipeRight === false ) {
|
if ( swipeRight === false ) {
|
||||||
if ( pickerRoot.classList.contains('paused') ) {
|
if ( pickerRoot.classList.contains('paused') ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user