fix: deselect linear element when clicked inside bounding box outside editor (#5579)

This commit is contained in:
Aakansha Doshi 2022-08-16 23:05:38 +05:30 committed by GitHub
parent fd946adbae
commit 27cf5ed17e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4179,6 +4179,7 @@ class App extends React.Component<AppProps, AppState> {
if (didDrag) {
pointerDownState.lastCoords.x = pointerCoords.x;
pointerDownState.lastCoords.y = pointerCoords.y;
pointerDownState.drag.hasOccurred = true;
if (
this.state.editingLinearElement &&
!this.state.editingLinearElement.isDragging
@ -4936,7 +4937,6 @@ class App extends React.Component<AppProps, AppState> {
}
if (
!this.state.selectedLinearElement &&
!this.state.editingLinearElement &&
!pointerDownState.drag.hasOccurred &&
!this.state.isResizing &&