Commit e424b387 authored by Jacob Thornton's avatar Jacob Thornton
Browse files

fixes #4781

parent f3e45c37
6 merge requests!8635ignore Gruntfile.js in jekyll,!8339Fix broken links to navbar component in docs examples,!8157Close Me: Docs "Customize and Download" button fix,!8656Added rel="stylesheet" to CDN-Examples,!8527Inner properties move 1,!8245Interactive color picker - Closed: request against wrong branch
Showing with 9 additions and 7 deletions
+9 -7
......@@ -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()
}
......
This diff is collapsed.
......@@ -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()
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment