@elementor/editor-interactions 4.1.0-815 → 4.1.0-817
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -12
- package/src/hooks/on-duplicate.ts +7 -1
package/dist/index.mjs
CHANGED
|
@@ -1862,10 +1862,14 @@ import { getAllDescendants, getContainer as getContainer2 } from "@elementor/edi
|
|
|
1862
1862
|
import { registerDataHook } from "@elementor/editor-v1-adapters";
|
|
1863
1863
|
function initCleanInteractionIdsOnDuplicate() {
|
|
1864
1864
|
registerDataHook("after", "document/elements/duplicate", (_args, result) => {
|
|
1865
|
+
if (!result || typeof result === "boolean" && result === false) {
|
|
1866
|
+
return;
|
|
1867
|
+
}
|
|
1865
1868
|
const containers = Array.isArray(result) ? result : [result];
|
|
1866
1869
|
containers.forEach((container) => {
|
|
1867
1870
|
cleanInteractionIdsRecursive(container.id);
|
|
1868
1871
|
});
|
|
1872
|
+
window.dispatchEvent(new CustomEvent("elementor/element/update_interactions"));
|
|
1869
1873
|
});
|
|
1870
1874
|
}
|
|
1871
1875
|
function cleanInteractionIdsRecursive(elementId) {
|