From 259d69955100f416de368708eee494d6d2fe2288 Mon Sep 17 00:00:00 2001 From: Lapo Luchini Date: Sat, 22 Nov 2014 22:51:51 +0100 Subject: [PATCH] Remove race condition waiting for proper event instead of fixed time. --- pinry/static/js/pin-form.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pinry/static/js/pin-form.js b/pinry/static/js/pin-form.js index ef5b631..9bf29af 100644 --- a/pinry/static/js/pin-form.js +++ b/pinry/static/js/pin-form.js @@ -48,9 +48,9 @@ $(window).load(function() { function dismissModal(modal) { modal.modal('hide'); - setTimeout(function() { + modal.on('hidden.bs.modal', function() { modal.remove(); - }, 200); + }); } // End Helper Functions