From 06f2213d4cff0e3d4396f31892a0b98b0b62e165 Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 3 Sep 2018 15:49:39 -0700 Subject: [PATCH] #6218 - Allow popup to use settings.closable without onclick --- src/definitions/modules/popup.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/definitions/modules/popup.js b/src/definitions/modules/popup.js index 26e59cb1f..2209e9c40 100644 --- a/src/definitions/modules/popup.js +++ b/src/definitions/modules/popup.js @@ -1015,7 +1015,7 @@ $.fn.popup = function(parameters) { if(settings.on == 'hover' && openedWithTouch) { module.bind.touchClose(); } - if(settings.on == 'click' && settings.closable) { + if(module.should.useClickaway()) { module.bind.clickaway(); } }, @@ -1073,6 +1073,12 @@ $.fn.popup = function(parameters) { should: { centerArrow: function(calculations) { return !module.is.basic() && calculations.target.width <= (settings.arrowPixelsFromEdge * 2); + }, + useClickaway: function() { + return (settings.closable == 'auto') + ? (settings.on == 'click') + : settings.closable + ; } },