liriliri / eruda

Console for mobile browsers
https://eruda.liriliri.io
MIT License
18.07k stars 1.16k forks source link

fix: mouse cannot be used on devices with touchscreen #345

Closed ishamf closed 11 months ago

ishamf commented 1 year ago

When using a mouse on a phone, cannot open or resize the eruda window. (very edge case I know...)

To fix it, I just added code to always handle both touch and mouse events, and make sure to call preventDefault on the touch event so the mousedown doesn't get fired again.

Attached video has 2 parts:

https://github.com/liriliri/eruda/assets/3515649/de453903-a85d-4367-b0e5-d871b67a9c9e

surunzi commented 11 months ago

Fixed in 3.0.1 using pointer events.