From 7ea4805134136ea99e650e4d78be5e76ced0c3ed Mon Sep 17 00:00:00 2001
From: Ere Maijala <ere.maijala@helsinki.fi>
Date: Mon, 24 Oct 2016 23:18:08 +0300
Subject: [PATCH] Fix order of modal show and ajax request (#840)

- avoids the possibility of calling handleUpdate for the modal before it's actually shown.
---
 themes/bootstrap3/js/lightbox.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/themes/bootstrap3/js/lightbox.js b/themes/bootstrap3/js/lightbox.js
index 6f2ae9782c1..37a5a9352b1 100644
--- a/themes/bootstrap3/js/lightbox.js
+++ b/themes/bootstrap3/js/lightbox.js
@@ -203,9 +203,9 @@ VuFind.register('lightbox', function Lightbox() {
       }
       _lightboxTitle = $(this).data('lightboxTitle') || '';
       _modalParams = $(this).data();
+      VuFind.modal('show');
       ajax(obj);
       _currentUrl = this.href;
-      VuFind.modal('show');
       return false;
     }
   };
-- 
GitLab