Fix exception when clicking grid controls

This commit is contained in:
Max Goodhart
2020-11-09 01:25:01 -08:00
parent 022519d928
commit f591685a36

View File

@@ -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],