Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Touch-related bug interrupts drawing #87

Open
piperone opened this issue Jan 13, 2025 · 0 comments
Open

[Bug] Touch-related bug interrupts drawing #87

piperone opened this issue Jan 13, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@piperone
Copy link

Hi. I've been using this library for the last few years on my PWA used primarily on iPads here. There is a bug that makes writing with a pen (like the Apple Pencil) on touch-devices using Perfect freehand a poor user experience.

To reproduce, do the following:

  1. Go to your example at https://biwyi.csb.app/
  2. With a stylus-device, tap once then quickly draw a line. The inputs should be [touchStart-touchStop] [touchStart-touchMove].
  3. If done correctly, the second touch-action is ignored and the browser tries to focus on the closes element (not sure about the logic here). In the case of the example above, a "Share"-tooltip is displayed when using Safari, interrupting the drawing.

If you don't have a stylus, you can get similar results by tapping with your finger and holding. Keeping your finger still, the browser shows the text-magnifier, thinking you're trying to highlight text. We have touch-action: none on the SVG, so we know that ain't it.

Now, I realize that this a renderer-issue, but your example app here does not suffer from this bug and it uses the renderer from tldraw.com. I would like to see an example renderer implementation that doesn't have this issue but without being dependent on tldraw.com. Any chance of that?

Thanks for your hard work!

@piperone piperone added the bug Something isn't working label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant