mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-15 01:55:46 +02:00
fixes #5336: reorder focus() call to avoid scrolling
This commit is contained in:
7
js/bootstrap-modal.js
vendored
7
js/bootstrap-modal.js
vendored
@@ -70,13 +70,12 @@
|
||||
that.$element
|
||||
.addClass('in')
|
||||
.attr('aria-hidden', false)
|
||||
.focus()
|
||||
|
||||
that.enforceFocus()
|
||||
|
||||
transition ?
|
||||
that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
|
||||
that.$element.trigger('shown')
|
||||
that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
|
||||
that.$element.focus().trigger('shown')
|
||||
|
||||
})
|
||||
}
|
||||
@@ -232,4 +231,4 @@
|
||||
})
|
||||
})
|
||||
|
||||
}(window.jQuery);
|
||||
}(window.jQuery);
|
||||
|
Reference in New Issue
Block a user