| 5 | | var enforceModalFocusFn = $.fn.modal.Constructor.prototype.enforceFocus; |
| 6 | | |
| 7 | | $.fn.modal.Constructor.prototype.enforceFocus = function() {}; |
| 8 | | |
| 9 | | $confModal.on('hidden', function() { |
| 10 | | $.fn.modal.Constructor.prototype.enforceFocus = enforceModalFocusFn; |
| 11 | | }); |
| 12 | | |
| 13 | | $confModal.modal({ backdrop : false }); |
| | 5 | $.fn.modal.Constructor.prototype.enforceFocus = function() { |
| | 6 | var $modalElement = this.$element; |
| | 7 | $(document).on( |
| | 8 | 'focusin.modal', |
| | 9 | function(e) { |
| | 10 | var $parent = $(e.target.parentNode); |
| | 11 | if ($modalElement[0] !== e.target |
| | 12 | && !$modalElement.has(e.target).length |
| | 13 | && !$parent.is("[class*='cke']") |
| | 14 | && !$parent.attr('data-cke-expando')) { |
| | 15 | $modalElement.focus(); |
| | 16 | } |
| | 17 | }); |
| | 18 | }; |