everestpipkin / image-scrubber

A friendly browser-based tool for anonymizing photographs taken at protests
https://everestpipkin.github.io/image-scrubber
MIT License
928 stars 82 forks source link

Input stops after cursor leaves canvas #27

Open lonelymaw opened 4 years ago

lonelymaw commented 4 years ago

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

  1. Hold down the mouse button in the image bounds with a brush selected.
  2. Keeping the mouse button held, move the cursor out of the image bounds.
  3. 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.

vphan6896 commented 4 years ago

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.