1// $Id$ 2// Workaround ckeditor and datepicker problems in Bootstrap 3 3// Refer http://ckeditor.com/forums/Support/Issue-with-Twitter-Bootstrap 4// and https://github.com/twbs/bootstrap/issues/5816 5// and others on the web 6// 7// NOTE this is not a clean solutions but works for now and there does not seem to be better way 8 9$.fn.modal.Constructor.prototype.enforceFocus = function () { 10 $(document) 11 .off('focusin.bs.modal') // guard against infinite focus loop 12 .on('focusin.bs.modal', $.proxy(function (e) { 13 if (this.$element[0] !== e.target && !this.$element.has(e.target).length 14 // add custom exclusion conditions you need here: 15 && 16 !$(e.target.parentNode).hasClass('cke_dialog_ui_input_select') && !$(e.target.parentNode).hasClass('cke_dialog_ui_input_text') 17 && 18 !$(e.target).hasClass('ui-datepicker-month') && !$(e.target).hasClass('ui-datepicker-year') 19 ){ 20 this.$element.trigger('focus') 21 } 22 }, this)) 23 24};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.