update to bootstrap-datepicker 1.0.2
This commit is contained in:
@ -54,24 +54,30 @@ Applied as jQuery method.
|
||||
var $target = $(e.target), i,
|
||||
exclude_classes = ['.editable-container',
|
||||
'.ui-datepicker-header',
|
||||
'.datepicker', //in inline mode datepicker is rendered into body
|
||||
'.modal-backdrop',
|
||||
'.bootstrap-wysihtml5-insert-image-modal',
|
||||
'.bootstrap-wysihtml5-insert-link-modal'
|
||||
];
|
||||
|
||||
//check if element is detached. It occurs when clicking in bootstrap datepicker
|
||||
if (!$.contains(document.documentElement, e.target)) {
|
||||
return;
|
||||
}
|
||||
|
||||
//for some reason FF 20 generates extra event (click) in select2 widget with e.target = document
|
||||
//we need to filter it via construction below. See https://github.com/vitalets/x-editable/issues/199
|
||||
//Possibly related to http://stackoverflow.com/questions/10119793/why-does-firefox-react-differently-from-webkit-and-ie-to-click-event-on-selec
|
||||
if($target.is(document)) {
|
||||
return;
|
||||
}
|
||||
|
||||
//if click inside one of exclude classes --> no nothing
|
||||
for(i=0; i<exclude_classes.length; i++) {
|
||||
if($target.is(exclude_classes[i]) || $target.parents(exclude_classes[i]).length) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//for some reason FF 20 generates extra event (click) in select2 widget with e.target = document
|
||||
//we need to filter it via construction below. See https://github.com/vitalets/x-editable/issues/199
|
||||
//Possibly related to http://stackoverflow.com/questions/10119793/why-does-firefox-react-differently-from-webkit-and-ie-to-click-event-on-selec
|
||||
if($target.is(document)) {
|
||||
return;
|
||||
}
|
||||
|
||||
//close all open containers (except one - target)
|
||||
Popup.prototype.closeOthers(e.target);
|
||||
|
Reference in New Issue
Block a user