logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: a485ebc2bb120e7cc6eafb7d86a5f876608f7fe1
parent 6980e4ddf1aa8dfd8c3bba0ea6cc7de90f531ba9
Author: Tusooa Zhu <tusooa@kazv.moe>
Date:   Mon,  2 Aug 2021 22:08:04 -0400

Check whether we swiped only for mouse pointer

Diffstat:

Msrc/services/gesture_service/gesture_service.js6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/services/gesture_service/gesture_service.js b/src/services/gesture_service/gesture_service.js @@ -190,7 +190,11 @@ class SwipeAndClickGesture { this.swipeEndCallback(sign) } this._reset() - if (swiped) { + // Only a mouse will fire click event when + // the end point is far from the starting point + // so for other kinds of pointers do not check + // whether we have swiped + if (swiped && event.pointerType === 'mouse') { this._preventNextClick = true } }