Explorar o código

fix: pasted elements except binded text once paste action is complete (#4472)

Aakansha Doshi %!s(int64=3) %!d(string=hai) anos
pai
achega
f463c047c0
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/components/App.tsx

+ 2 - 1
src/components/App.tsx

@@ -123,6 +123,7 @@ import {
   hasBoundTextElement,
   isBindingElement,
   isBindingElementType,
+  isBoundToContainer,
   isImageElement,
   isInitializedImageElement,
   isLinearElement,
@@ -1419,7 +1420,7 @@ class App extends React.Component<AppProps, AppState> {
           ...this.state,
           isLibraryOpen: false,
           selectedElementIds: newElements.reduce((map, element) => {
-            if (isTextElement(element) && !element.containerId) {
+            if (!isBoundToContainer(element)) {
               map[element.id] = true;
             }
             return map;