mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-23 20:40:36 +03:00
fixes #4781
This commit is contained in:
Vendored
+3
-2
@@ -835,7 +835,6 @@
|
||||
transition ?
|
||||
that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown.bs.modal') }) :
|
||||
that.$element.focus().trigger('shown.bs.modal')
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
@@ -864,7 +863,9 @@
|
||||
}
|
||||
|
||||
Modal.prototype.enforceFocus = function () {
|
||||
$(document).on('focusin.bs.modal', function (e) {
|
||||
$(document)
|
||||
.off('focusin.bs.modal') // guard against infinite focus loop
|
||||
.on('focusin.bs.modal', function (e) {
|
||||
if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
|
||||
this.$element.focus()
|
||||
}
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+3
-2
@@ -76,7 +76,6 @@
|
||||
transition ?
|
||||
that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown.bs.modal') }) :
|
||||
that.$element.focus().trigger('shown.bs.modal')
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
@@ -105,7 +104,9 @@
|
||||
}
|
||||
|
||||
Modal.prototype.enforceFocus = function () {
|
||||
$(document).on('focusin.bs.modal', function (e) {
|
||||
$(document)
|
||||
.off('focusin.bs.modal') // guard against infinite focus loop
|
||||
.on('focusin.bs.modal', function (e) {
|
||||
if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
|
||||
this.$element.focus()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user