mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-11 18:02:28 +03:00
add proper role to dialog markup and cleanup modal logging
This commit is contained in:
Vendored
+2
-8
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user