Преглед изворни кода

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

Aakansha Doshi пре 3 година
родитељ
комит
f463c047c0
1 измењених фајлова са 2 додато и 1 уклоњено
  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;