Fix mouse functionality on touch devices.#1960
Fix mouse functionality on touch devices.#1960danrha wants to merge 1 commit intopaperjs:developfrom
Conversation
|
Hmm, looking at how it's implemented at the moment Line 1073 in 3ef3ca6 It is checking But it should be checking Could you try this instead of the changes you are proposing, and check if it solves it, |
| @@ -1076,18 +1076,9 @@ new function() { // Injection scope for event handling on the browser | |||
| mousemove = 'pointermove MSPointerMove'; | |||
| mouseup = 'pointerup pointercancel MSPointerUp MSPointerCancel'; | |||
| } else { | |||
There was a problem hiding this comment.
You should try changing line 1073
Line 1073 in 3ef3ca6
if ('PointerEvent' in window) { and check whether it solves your problem
(instead of the changes proposed below)
There was a problem hiding this comment.
Unfortunately there seems to be some possible breaking behaviour, which I'm not fully aware of atm #1810 (comment)
There was a problem hiding this comment.
Using PointerEvent does fix it for me but I still see no harm in always listening to all the events instead of depending on the userAgent string. The mouse events shouldn't be called after calling preventDefault on the touch events anyways.
Description
Remove special case for touch devices when adding event listeners to the view.
Related issues