From 50f5d8d74b6dd59dac4f85fa2923782c8c634240 Mon Sep 17 00:00:00 2001 From: Jack Lukic Date: Sun, 15 May 2016 14:19:52 -0400 Subject: [PATCH] Fixes #3887 element removed from DOM would cause popup to be closed --- src/definitions/modules/popup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/definitions/modules/popup.js b/src/definitions/modules/popup.js index 2aec74bc0..12b6e4619 100644 --- a/src/definitions/modules/popup.js +++ b/src/definitions/modules/popup.js @@ -197,7 +197,7 @@ $.fn.popup = function(parameters) { inPopup = ($target.closest(selector.popup).length > 0) ; // don't close on clicks inside popup - if(event && $(event.target).closest(selector.popup).length === 0) { + if(event && !inPopup && isInDOM) { module.debug('Click occurred outside popup hiding popup'); module.hide(); }