From f591685a36451205fd55709c749d6ab820469a5e Mon Sep 17 00:00:00 2001 From: Max Goodhart Date: Mon, 9 Nov 2020 01:25:01 -0800 Subject: [PATCH] Fix exception when clicking grid controls --- src/web/control.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/web/control.js b/src/web/control.js index 1b519bd..5dcca7b 100644 --- a/src/web/control.js +++ b/src/web/control.js @@ -333,7 +333,8 @@ function App({ wsEndpoint, role }) { handleSwap(hoveringIdx) } else { setDragStart(hoveringIdx) - ev.target.select() + // Select the text (if it is an input element) + ev.target.select?.() } }, [handleSwap, swapStartIdx, hoveringIdx],