-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: pointer events on multi-input devices with Windows 10 and Chrome
- Loading branch information
1 parent
fc9ce1a
commit 17b35b3
Showing
2 changed files
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -140,7 +140,7 @@ var framework = { | |||
features.caf = window.cancelAnimationFrame; | ||||
} | ||||
|
||||
features.pointerEvent = navigator.pointerEnabled || navigator.msPointerEnabled; | ||||
features.pointerEvent = !!(window.PointerEvent) || navigator.msPointerEnabled; | ||||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
dimsemenov
Author
Owner
|
_likelyTouchDevice = (navigator.maxTouchPoints > 1) || (navigator.msMaxTouchPoints > 1); |
Though, I agree that allowPanToNext
should be recognized during gesture based on pointer type, not on initialization.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
after changing that, I find that
window.PointerEvent
can be detected in Chrome(v71.0.3578.98) Device Mode, and_likelyTouchDevice
then befalse
, it makes some feature not work correctly likeallowPanToNext
in option.