fix: isPressed will return value expectedly on iOS13#123
Conversation
yoannmoinet
left a comment
There was a problem hiding this comment.
Thanks a ton for this.
I have a single comment.
| }; | ||
|
|
||
| export const isPressed = (evt) => { | ||
| if (evt.type === 'pointerdown' || evt.type === 'pointermove') { |
There was a problem hiding this comment.
Is it possible to have a evt.type === 'pointerdown' here? I don't see it.
Also, following that logic, maybe it will be the same for touchstart and touchmove?
There was a problem hiding this comment.
Sorry for late reply. When I tested with iPhone 11, I have confirmed 'pointerdown' event through here.
However, I think this is not fundamental solution, is just workaround.
So could I close this PR?
There was a problem hiding this comment.
don't close it, I think this is a good solution.
I'll take over if you don't have time for this, no worries.
There was a problem hiding this comment.
Ok, I got it.
I don't have enough time for debugging this now.
I'm working on some game project with nipplejs, and I got another bug with iOS 13 on iPhone SE: Sometimes joypad will not be destroyed, remains show up without disappearing even if I lift up my finger.
So I fork this, and I'm using this branch code.
umeruma@3be8638
fixes #122
The JoyPad cannot be moved on iOS 13 Safari, because of Pointer Event API that added.
https://developer.apple.com/documentation/safari_release_notes/safari_13_release_notes
Strangely, the JoyPad works fine on iOS 13 on this demo page https://yoannmoi.net/nipplejs/.
Although this fix has confirmed the expected behavior on iOS 13 Safari, it may not be a fundamental solution to the cause of this bug.