Browse Source

#6218 - Allow popup to use settings.closable without onclick

pull/6294/merge
Jack 6 years ago
parent
commit
06f2213d4c
1 changed files with 7 additions and 1 deletions
  1. 8
      src/definitions/modules/popup.js

8
src/definitions/modules/popup.js

@ -1015,7 +1015,7 @@ $.fn.popup = function(parameters) {
if(settings.on == 'hover' && openedWithTouch) { if(settings.on == 'hover' && openedWithTouch) {
module.bind.touchClose(); module.bind.touchClose();
} }
if(settings.on == 'click' && settings.closable) {
if(module.should.useClickaway()) {
module.bind.clickaway(); module.bind.clickaway();
} }
}, },
@ -1073,6 +1073,12 @@ $.fn.popup = function(parameters) {
should: { should: {
centerArrow: function(calculations) { centerArrow: function(calculations) {
return !module.is.basic() && calculations.target.width <= (settings.arrowPixelsFromEdge * 2); return !module.is.basic() && calculations.target.width <= (settings.arrowPixelsFromEdge * 2);
},
useClickaway: function() {
return (settings.closable == 'auto')
? (settings.on == 'click')
: settings.closable
;
} }
}, },

Loading…
Cancel
Save