From 108c29f8d0bc6555ee14f282342fdaafeb9f5602 Mon Sep 17 00:00:00 2001 From: takuma-ru Date: Thu, 9 May 2024 17:22:13 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Firefox=20=E6=99=82=E3=81=AE?= =?UTF-8?q?=E5=8B=95=E4=BD=9C=E3=82=A8=E3=83=A9=E3=83=BC=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/SwipeModal/SwipeModal.vue | 40 +++++++++++-------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/packages/core/src/components/SwipeModal/SwipeModal.vue b/packages/core/src/components/SwipeModal/SwipeModal.vue index 86df3aa..2c1406d 100644 --- a/packages/core/src/components/SwipeModal/SwipeModal.vue +++ b/packages/core/src/components/SwipeModal/SwipeModal.vue @@ -119,14 +119,18 @@ const handleOpenModal = () => { modalRef.value?.style.setProperty("visibility", "visible"); - modalRef.value.animate([ - { opacity: 0 }, - { opacity: 1 }, - ], { - duration: 200, - pseudoElement: "::backdrop", - easing: ANIMATION_EASING, - }); + const isFirefox = navigator.userAgent.toLowerCase().includes("firefox"); + + if (!isFirefox) { + modalRef.value.animate([ + { opacity: 0 }, + { opacity: 1 }, + ], { + duration: 200, + pseudoElement: "::backdrop", + easing: ANIMATION_EASING, + }); + } modalRef.value.animate( [ @@ -161,14 +165,18 @@ const handleCloseModal = () => { if (!modalRef.value) return; - modalRef.value.animate([ - { opacity: 1 }, - { opacity: 0 }, - ], { - duration: 300, - pseudoElement: "::backdrop", - easing: ANIMATION_EASING, - }); + const isFirefox = navigator.userAgent.toLowerCase().includes("firefox"); + + if (!isFirefox) { + modalRef.value.animate([ + { opacity: 1 }, + { opacity: 0 }, + ], { + duration: 300, + pseudoElement: "::backdrop", + easing: ANIMATION_EASING, + }); + } modalRef.value.animate( [