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

This commit is contained in:
Aakansha Doshi 2021-12-23 22:07:16 +05:30 committed by GitHub
parent 1fd347cade
commit f463c047c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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