mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 21:49:09 +01:00
fixes #4781
This commit is contained in:
parent
f3e45c3778
commit
e424b3879c
7
docs/assets/js/bootstrap.js
vendored
7
docs/assets/js/bootstrap.js
vendored
@ -817,7 +817,7 @@
|
||||
var transition = $.support.transition && that.$element.hasClass('fade')
|
||||
|
||||
if (!that.$element.parent().length) {
|
||||
that.$element.appendTo(document.body) //don't move modals dom position
|
||||
that.$element.appendTo(document.body) // don't move modals dom position
|
||||
}
|
||||
|
||||
that.$element.show()
|
||||
@ -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()
|
||||
}
|
||||
|
2
docs/assets/js/bootstrap.min.js
vendored
2
docs/assets/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
@ -58,7 +58,7 @@
|
||||
var transition = $.support.transition && that.$element.hasClass('fade')
|
||||
|
||||
if (!that.$element.parent().length) {
|
||||
that.$element.appendTo(document.body) //don't move modals dom position
|
||||
that.$element.appendTo(document.body) // don't move modals dom position
|
||||
}
|
||||
|
||||
that.$element.show()
|
||||
@ -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()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user