From 052acfc2cebb1c011046f253d97748a720af4e45 Mon Sep 17 00:00:00 2001 From: metonym Date: Wed, 29 Jun 2022 10:57:37 -0700 Subject: [PATCH] Revert "fix(notification): `on:close` should be cancellable (#1379)" (#1381) This reverts commit 924b6d352eebf5c82da63f0ead450dc59e80ca30. --- src/Notification/InlineNotification.svelte | 10 ++-------- src/Notification/ToastNotification.svelte | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/Notification/InlineNotification.svelte b/src/Notification/InlineNotification.svelte index 4cd57717..19cb0588 100644 --- a/src/Notification/InlineNotification.svelte +++ b/src/Notification/InlineNotification.svelte @@ -40,14 +40,8 @@ let timeoutId = undefined; function close(closeFromTimeout) { - const shouldContinue = dispatch( - "close", - { timeout: closeFromTimeout === true }, - { cancelable: true } - ); - if (shouldContinue) { - open = false; - } + open = false; + dispatch("close", { timeout: closeFromTimeout === true }); } onMount(() => { diff --git a/src/Notification/ToastNotification.svelte b/src/Notification/ToastNotification.svelte index 1d00ba4e..ff60b6c7 100644 --- a/src/Notification/ToastNotification.svelte +++ b/src/Notification/ToastNotification.svelte @@ -43,14 +43,8 @@ let timeoutId = undefined; function close(closeFromTimeout) { - const shouldContinue = dispatch( - "close", - { timeout: closeFromTimeout === true }, - { cancelable: true } - ); - if (shouldContinue) { - open = false; - } + open = false; + dispatch("close", { timeout: closeFromTimeout === true }); } onMount(() => {