image-scrubber
image-scrubber copied to clipboard
Input stops after cursor leaves canvas
Bug
While drawing, if the cursor leaves the bounds of the image while the mouse button is held down the input is stopped, and the mouse button must be released and re-pressed in the canvas to resume drawing.
Steps to reproduce
- Hold down the mouse button in the image bounds with a brush selected.
- Keeping the mouse button held, move the cursor out of the image bounds.
- Attempt to re-enter the image bounds with the cursor.
Expected result
The brush will still be active when the cursor re-enters the canvas.
Actual result
The brush is no longer active and the mouse button must be re-pressed.
Additional details
This only seems to happen in a desktop browser. The same issue does not occur when tested on mobile.
Just adding onto this with my findings on my local testing. I found that this issue does not occur on the current version of the repo ran locally. It seems the 'mouseout' events will override the 'mousedown' event and paint/blur/undo as you leave the canvas. This issue does reoccur on my end on Google Chrome when using the tool's live version.