diff --git a/streamlit_drawable_canvas/frontend/src/lib/rect.ts b/streamlit_drawable_canvas/frontend/src/lib/rect.ts index 3ede540..ca03a29 100644 --- a/streamlit_drawable_canvas/frontend/src/lib/rect.ts +++ b/streamlit_drawable_canvas/frontend/src/lib/rect.ts @@ -61,7 +61,7 @@ class RectTool extends FabricTool { noScaleCache: false, angle: 0, }) - if (_clicked === 0) { + if (_clicked === 0 || o.e instanceof TouchEvent) { canvas.add(this.currentRect) } }