diff options
| -rw-r--r-- | js/modal.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/js/modal.js b/js/modal.js index 5049cccf3..cba48507a 100644 --- a/js/modal.js +++ b/js/modal.js @@ -140,7 +140,9 @@ $(document) .off('focusin.bs.modal') // guard against infinite focus loop .on('focusin.bs.modal', $.proxy(function (e) { - if (this.$element[0] !== e.target && !this.$element.has(e.target).length) { + if (document !== event.target && + this.$element[0] !== e.target && + !this.$element.has(e.target).length) { this.$element.trigger('focus') } }, this)) |
