From 71eeba4340b1d0f0714ada8a4fb44e2e62bd2e69 Mon Sep 17 00:00:00 2001 From: Miodec Date: Mon, 31 Jan 2022 13:09:35 +0100 Subject: [PATCH] no anim if there is a previous callback --- src/js/popups/quote-report-popup.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/popups/quote-report-popup.js b/src/js/popups/quote-report-popup.js index d17902ede..cddd58742 100644 --- a/src/js/popups/quote-report-popup.js +++ b/src/js/popups/quote-report-popup.js @@ -47,6 +47,8 @@ export async function show(options = defaultOptions) { export async function hide() { if (!$("#quoteReportPopupWrapper").hasClass("hidden")) { + let noAnim = state.previousPopupShowCallback ? true : false; + $("#quoteReportPopupWrapper") .stop(true, true) .css("opacity", 1) @@ -54,7 +56,7 @@ export async function hide() { { opacity: 0, }, - 100, + noAnim ? 0 : 100, (e) => { grecaptcha.reset(CAPTCHA_ID); $("#quoteReportPopupWrapper").addClass("hidden");