-
Notifications
You must be signed in to change notification settings - Fork 95
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
[Enhancement]: Drawing outside of the window #521
Comments
Seems like the pointer up event doesn't fire if you go out of the window and release the input device. |
I tested it myself but couldn't replicate it anymore. |
Firefox 115.3.0esr on Linux Debian with i3 on Xorg, with a number of extensions installed and Trying on a clean Firefox profile: the bug is still reproducible. |
Yeah, chromium works fine on me. |
Fixed in 2.0.0-beta.15, if you refresh the website, it should be fixed |
Still reproducible on https://preview.butterfly.linwood.dev/ . Settings show 15'th revision. |
Oh, I will look at it again... |
Okay, it should now reset all inputs when unfocused. Can you test if the bug appears in the current version? (don't forget to refresh the site after loading so that it can fetch the newest version) |
Behaviour changed now: it does not lock to zoom mode. Stroke being drawn gets frozen until I click again, it cancels the stroke entirely. disappear.webmBetter than before (I can continue using the app instead of being forced to reload the window and maybe lose unsaved content), but still suboptimal. User should not "be afraid of the edges". Not sure how to attain it though. Maybe some heuristics? |
Oh you are right. Thanks for testing, i will try to fix this |
I think now it should be fixed |
Now it does not erase the stroke, but also does not continue after cursor is offscreen. It should work like in e.g. https://sketch.io/sketchpad/ - in the same Firefox I can continue drawing a stroke even when cursor is off the browser window. It also explicitly reacts to mouse button release even when cursor is away. sketchio.webmCan Butterfly work the same way? |
The problem is I can't get the pointer id that leaves the app, and if you release the device when outside of the app, I don't get this event. |
Why sketch.io does receive a mouse up event even when cursor is away from Firefox window, as demonstrated on the video?
If there is only one pointer (i.e. mouse, no multi-touch) then any mouse release is the pointer release. |
Okay... https://stackoverflow.com/questions/14407869/capture-mouseup-event-outside-of-browser-window |
Okay I tried everything but couldn't find a solution. setPointerCapture(event.pointerId) does not work when listing on them. |
What is the drawing area widget? Where is it located in the code? Could you try to identify its dimensions and deactivate the pen when it reaches there without having to read the id |
Hi, Butterfly/app/lib/views/view.dart Lines 380 to 407 in 4716732
I intentionally disabled this feature: Butterfly/app/lib/views/view.dart Lines 374 to 377 in 4716732
The problem is that I don't get a pointerup event to unregister the input and otherwise you will end up zooming with one input because the other input wasn't unregistered. You can try it out if you remove the onExit callback and start the webserver with |
Can this work for you? Recording.2024-03-20.101314.mp4 |
What happened?
It thinks that input device keeps touching and interprets further clicks as double touches.
bottombug.webm
Version
2.0.0-beta.14
Platform
Web
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: