1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-14 23:12:28 +02:00

Fix swipe right to exit zapper/picker on touch displays

Regression from:
- d23f9c6a8b
This commit is contained in:
Raymond Hill 2020-09-12 11:29:39 -04:00
parent 218f774ba0
commit 05893a6c16
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -301,7 +301,6 @@ const onSvgTouch = (( ) => {
return;
}
if ( startX === undefined ) { return; }
if ( ev.cancelable === false ) { return; }
const stopX = ev.changedTouches[0].screenX;
const stopY = ev.changedTouches[0].screenY;
const angle = Math.abs(Math.atan2(stopY - startY, stopX - startX));
@ -329,7 +328,9 @@ const onSvgTouch = (( ) => {
if ( swipeRight === false && angle < Math.PI - angleUpperBound ) {
return;
}
ev.preventDefault();
if ( ev.cancelable ) {
ev.preventDefault();
}
// Swipe left.
if ( swipeRight === false ) {
if ( pickerRoot.classList.contains('paused') ) {