From 9aaaa244263db8fdd3389ec1121bc485d84d4521 Mon Sep 17 00:00:00 2001 From: Christopher Chedeau Date: Wed, 1 Jan 2020 21:13:01 -0800 Subject: [PATCH] Also for text --- src/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.js b/src/index.js index e214c91c..9be181d5 100644 --- a/src/index.js +++ b/src/index.js @@ -252,12 +252,16 @@ function App() { elements.push(element); if (elementType === "text") { setDraggingElement(null); + element.isSelected = true; } else { setDraggingElement(element); } drawScene(); }} onMouseUp={e => { + if (draggingElement === null) { + return; + } if (elementType === "selection") { // Remove actual selection element elements.pop();