Browse Source

#2769 Fix logic in onHide, to only close when NOT false, add onShow

pull/2414/merge
Jack Lukic 9 years ago
parent
commit
81f50e0f7a
1 changed files with 10 additions and 9 deletions
  1. 19
      src/definitions/modules/dropdown.js

19
src/definitions/modules/dropdown.js

@ -412,14 +412,15 @@ $.fn.dropdown = function(parameters) {
if(module.has.message() && !module.has.maxSelections()) { if(module.has.message() && !module.has.maxSelections()) {
module.remove.message(); module.remove.message();
} }
module.animate.show(function() {
if( module.can.click() ) {
module.bind.intent();
}
module.set.visible();
callback.call(element);
});
settings.onShow.call(element);
if(settings.onHide.call(element) !== false) {
module.animate.show(function() {
if( module.can.click() ) {
module.bind.intent();
}
module.set.visible();
callback.call(element);
});
}
} }
}, },
@ -430,7 +431,7 @@ $.fn.dropdown = function(parameters) {
; ;
if( module.is.active() ) { if( module.is.active() ) {
module.debug('Hiding dropdown'); module.debug('Hiding dropdown');
if(settings.onHide.call(element) === false) {
if(settings.onHide.call(element) !== false) {
module.animate.hide(function() { module.animate.hide(function() {
module.remove.visible(); module.remove.visible();
callback.call(element); callback.call(element);

Loading…
Cancel
Save