1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-25 21:09:06 +02:00

add proper role to dialog markup and cleanup modal logging

This commit is contained in:
Jacob Thornton
2012-05-16 19:43:22 -07:00
parent 4b53778150
commit 10c6db4b14
7 changed files with 15 additions and 33 deletions

View File

@@ -762,7 +762,8 @@
$('body').removeClass('modal-open')
this.escape()
this.relaxFocus()
$(document).off('focusin.modal')
this.$element.removeClass('in')
@@ -773,20 +774,13 @@
, enforceFocus: function () {
var that = this
var console = window.console
console.log('attach');
$(document).on('focusin.modal', function (e) {
console.log('triggered');
if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
that.$element.focus()
}
})
}
, relaxFocus: function () {
$(document).off('focus.modal')
}
, escape: function () {
var that = this
if (this.isShown && this.options.keyboard) {