Modal: Ignore spurious `focus` event that Firefox fires at `document` when switching back to its tab
Fixes #18365 Refs https://bugzilla.mozilla.org/show_bug.cgi?id=1228802
This commit is contained in:
parent
2c69e0f810
commit
d12ed5520e
|
@ -259,8 +259,9 @@ const Modal = (($) => {
|
|||
$(document)
|
||||
.off(Event.FOCUSIN) // guard against infinite focus loop
|
||||
.on(Event.FOCUSIN, (event) => {
|
||||
if (this._element !== event.target &&
|
||||
(!$(this._element).has(event.target).length)) {
|
||||
if (document !== event.target &&
|
||||
this._element !== event.target &&
|
||||
(!$(this._element).has(event.target).length)) {
|
||||
this._element.focus()
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue