mirror of
https://github.com/twbs/bootstrap.git
synced 2025-03-13 13:29:25 +01: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:
parent
50ce63b5e5
commit
aeb25ba521
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user