Use local transitions in modal to avoid issues with component unmounting when navigating away

This commit is contained in:
Andrew Kingston 2021-05-07 13:13:24 +01:00
parent b4f5b1df8d
commit 78f9f801ce
1 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@
<Portal target=".modal-container">
<div
class="spectrum-Underlay is-open"
transition:fade={{ duration: 200 }}
transition:fade|local={{ duration: 200 }}
on:mousedown|self={hide}
>
<div class="modal-wrapper" on:mousedown|self={hide}>
@ -57,7 +57,7 @@
<div
use:focusFirstInput
class="spectrum-Modal is-open"
transition:fly={{ y: 30, duration: 200 }}
transition:fly|local={{ y: 30, duration: 200 }}
>
<slot />
</div>