diff --git a/themes/bootstrap3/js/lightbox.js b/themes/bootstrap3/js/lightbox.js
index 0f017f299753082df2ec810bac8c0a7661b7bd9b..e6a653f7515f13fd71679fb2d563e19790b72ab2 100644
--- a/themes/bootstrap3/js/lightbox.js
+++ b/themes/bootstrap3/js/lightbox.js
@@ -55,6 +55,9 @@ VuFind.register('lightbox', function Lightbox() {
     _modalBody.find('h2:first-of-type')
       .after('<div class="flash-message alert alert-' + type + '">' + message + '</div>');
   }
+  function close() {
+    _modal.modal('hide');
+  }
 
   /**
    * Update content
@@ -80,7 +83,7 @@ VuFind.register('lightbox', function Lightbox() {
       var href = alerts.find('.download').attr('href');
       if (typeof href !== 'undefined') {
         location.href = href;
-        _modal.modal('hide');
+        close();
       } else {
         showAlert(msgs, 'success');
       }
@@ -386,6 +389,7 @@ VuFind.register('lightbox', function Lightbox() {
     ajax: ajax,
     alert: showAlert,
     bind: bind,
+    close: close,
     flashMessage: flashMessage,
     reload: reload,
     render: render,