From 4bc2c7a28fbf6ded5e8b85abebb19932452dc5cb Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 17 Aug 2022 15:17:29 +0100 Subject: [PATCH] Revert click context --- packages/client/src/components/app/Button.svelte | 5 ----- packages/client/src/components/app/Container.svelte | 7 +------ packages/client/src/utils/buttonActions.js | 4 ---- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/packages/client/src/components/app/Button.svelte b/packages/client/src/components/app/Button.svelte index a10b992561..018f21c583 100644 --- a/packages/client/src/components/app/Button.svelte +++ b/packages/client/src/components/app/Button.svelte @@ -4,7 +4,6 @@ const { styleable, builderStore } = getContext("sdk") const component = getContext("component") - const containerClickableStore = getContext("containerClickable") export let disabled = false export let text = "" @@ -19,10 +18,6 @@ let node - containerClickableStore.subscribe(hasOnClick => { - disabled = hasOnClick - }) - $: $component.editing && node?.focus() $: componentText = getComponentText(text, $builderStore, $component) diff --git a/packages/client/src/components/app/Container.svelte b/packages/client/src/components/app/Container.svelte index e8e757bc3e..a5c8ce6d4d 100644 --- a/packages/client/src/components/app/Container.svelte +++ b/packages/client/src/components/app/Container.svelte @@ -1,13 +1,9 @@
{ - if (actions && actions.length === 0) { - return null - } - // Prevent button actions in the builder preview if (!actions || get(builderStore).inBuilder) { return () => {}