From f91b3fe747e74483b7700295822dbcc39f0a45d8 Mon Sep 17 00:00:00 2001 From: Ross Squires Date: Fri, 11 Sep 2015 13:14:36 -0400 Subject: [PATCH] Prevent flicker while closing lightbox --- src/lightbox-service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lightbox-service.js b/src/lightbox-service.js index 5c4c049..b48d364 100644 --- a/src/lightbox-service.js +++ b/src/lightbox-service.js @@ -267,7 +267,7 @@ angular.module('bootstrapLightbox').provider('Lightbox', function () { }, modalParams || {})); // modal close handler - Lightbox.modalInstance.result['finally'](function () { + Lightbox.modalInstance.result.then(function () { // prevent the lightbox from flickering from the old image when it gets // opened again Lightbox.images = [];