fix: ungrouped bound text when duplicating element from a group outside to frame

This commit is contained in:
gowtham.selvaraj 2025-04-26 09:40:36 +05:30
parent dff69e9191
commit b340af8b61

View file

@ -9262,6 +9262,29 @@ class App extends React.Component<AppProps, AppState> {
},
false,
);
const boundTextElementToContainer = getBoundTextElement(
element,
this.scene.getNonDeletedElementsMap(),
);
if (
boundTextElementToContainer &&
this.state.editingGroupId &&
boundTextElementToContainer.groupIds.includes(
this.state.editingGroupId,
)
) {
mutateElement(
boundTextElementToContainer,
{
groupIds: boundTextElementToContainer.groupIds.filter(
(id) => id !== this.state.editingGroupId,
),
},
false,
);
}
}
nextElements.forEach((element) => {