diff --git a/packages/builder/src/builderStore/store/frontend.js b/packages/builder/src/builderStore/store/frontend.js index 97fad5f1bb..fc8b1b8427 100644 --- a/packages/builder/src/builderStore/store/frontend.js +++ b/packages/builder/src/builderStore/store/frontend.js @@ -667,16 +667,14 @@ export const getFrontendStore = () => { }) // Select the parent if cutting - if (cut) { + if (cut && selectParent) { const screen = get(selectedScreen) const parent = findComponentParent(screen?.props, component._id) if (parent) { - if (selectParent) { - store.update(state => { - state.selectedComponentId = parent._id - return state - }) - } + store.update(state => { + state.selectedComponentId = parent._id + return state + }) } } }, diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte index 3c7edf096f..2a606233c2 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte @@ -86,7 +86,11 @@ : [], isBudibaseEvent: true, usedPlugins: $store.usedPlugins, - location: window.location, + location: { + protocol: window.location.protocol, + hostname: window.location.hostname, + port: window.location.port, + }, } // Refresh the preview when required @@ -189,7 +193,7 @@ // Cut and paste the component to the new destination if (source && destination) { - store.actions.components.copy(source, true) + store.actions.components.copy(source, true, false) await store.actions.components.paste(destination, data.mode) } } else if (type === "click-nav") {