You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The bug is observed when there is multiple canvases in a page. I can draw independently on the canvases but while erasing on a canvas the same event is happened to all other canvases.
To Reproduce
Steps to reproduce the behavior:
Add multiple canvas in a page
Draw something independently to all the canvases
Try to erase in one canvas
You will notice all the drawings of other canvases is also erasing.
Expected behavior
It is expected that only the image I select to erase will perform the erasing operation.
I found another bug that might be related. When you have multiple canvases that use the backgroundImage prop, the canvases will use the background image of the first canvas.
would you mind set up a CodeSandBox / CodePen / StackBlitz to reproduce this problem?
By any chances you guys are using the same ref of ReactSketchCanvasRef for all canvas instead of one ref per each canvas?
I think sharing the same ref have potential of causing these bug.
I have tried multiple canvas in same page, but so far not yet encounter both earsier and same background image issue.
Describe the bug
The bug is observed when there is multiple canvases in a page. I can draw independently on the canvases but while erasing on a canvas the same event is happened to all other canvases.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It is expected that only the image I select to erase will perform the erasing operation.
Screenshots
canvas_issue.webm
Desktop (please complete the following information):
Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: