From 8ed853a0247de17237967d86372771fbe33a4944 Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Tue, 26 Jun 2018 20:58:03 -0400 Subject: [PATCH] Don't remove confirmation modal header text until after it's finished fading out --- resources/assets/js/dashboard.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/assets/js/dashboard.js b/resources/assets/js/dashboard.js index 6860692..77704e2 100644 --- a/resources/assets/js/dashboard.js +++ b/resources/assets/js/dashboard.js @@ -36,14 +36,15 @@ function askConfirmation(message, command, cancelCommand) { $cancelButton.off("click", closeConfirmationModal); $confirmButton.off("click", confirmModal); - // clear the heading - $heading.empty(); - // hide the modal $confirmationModal.css({ opacity: 0 }); setTimeout(function() { + // set visibility to hidden $confirmationModal.css({ visibility: "hidden" }); + + // clear the heading + $heading.empty(); }, fadeTime); };