mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-08 17:22:31 +03:00
Modal: Ignore spurious focus event that Firefox fires at document when switching back to its tab
Fixes #18365 Ports #18638 to v3 Refs https://bugzilla.mozilla.org/show_bug.cgi?id=1228802
This commit is contained in:
+3
-1
@@ -140,7 +140,9 @@
|
|||||||
$(document)
|
$(document)
|
||||||
.off('focusin.bs.modal') // guard against infinite focus loop
|
.off('focusin.bs.modal') // guard against infinite focus loop
|
||||||
.on('focusin.bs.modal', $.proxy(function (e) {
|
.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.$element.trigger('focus')
|
||||||
}
|
}
|
||||||
}, this))
|
}, this))
|
||||||
|
|||||||
Reference in New Issue
Block a user