Only insert text on double click when selection is enabled (#1937)

This was an oversight to enable it for all the shapes. I don't believe that we want to be able to insert text on double click when drawing a rectangle for example. And it's definitely a broken experience when doing so for free draw.

Fixes part of #1935
pull/1975/head
Christopher Chedeau 5 years ago committed by GitHub
parent c0ca6bae37
commit 925db9dcca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1746,6 +1746,10 @@ class App extends React.Component<ExcalidrawProps, AppState> {
if (this.state.multiElement) {
return;
}
// we should only be able to double click when mode is selection
if (this.state.elementType !== "selection") {
return;
}
const selectedElements = getSelectedElements(
globalSceneState.getElements(),

Loading…
Cancel
Save