diff options
| author | Tusooa Zhu <tusooa@kazv.moe> | 2021-08-02 22:08:04 -0400 |
|---|---|---|
| committer | Tusooa Zhu <tusooa@kazv.moe> | 2022-03-13 12:00:45 -0400 |
| commit | a485ebc2bb120e7cc6eafb7d86a5f876608f7fe1 (patch) | |
| tree | 868f29cb1323694e6917aa22ce0707af8065c3ff | |
| parent | 6980e4ddf1aa8dfd8c3bba0ea6cc7de90f531ba9 (diff) | |
Check whether we swiped only for mouse pointer
| -rw-r--r-- | src/services/gesture_service/gesture_service.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/services/gesture_service/gesture_service.js b/src/services/gesture_service/gesture_service.js index 97a26ba7..741d4a12 100644 --- 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 } } |
