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
This commit is contained in:
parent
c0ca6bae37
commit
925db9dcca
@ -1746,6 +1746,10 @@ class App extends React.Component<ExcalidrawProps, AppState> {
|
|||||||
if (this.state.multiElement) {
|
if (this.state.multiElement) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// we should only be able to double click when mode is selection
|
||||||
|
if (this.state.elementType !== "selection") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const selectedElements = getSelectedElements(
|
const selectedElements = getSelectedElements(
|
||||||
globalSceneState.getElements(),
|
globalSceneState.getElements(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user