mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-25 12:59:05 +02:00
fix #15301
This commit is contained in:
5
js/dist/modal.js
vendored
5
js/dist/modal.js
vendored
@@ -31,6 +31,7 @@ var Modal = (function ($) {
|
||||
var Default = {
|
||||
backdrop: true,
|
||||
keyboard: true,
|
||||
focus: true,
|
||||
show: true
|
||||
};
|
||||
|
||||
@@ -206,14 +207,14 @@ var Modal = (function ($) {
|
||||
|
||||
$(this._element).addClass(ClassName.IN);
|
||||
|
||||
this._enforceFocus();
|
||||
if (this._config.focus) this._enforceFocus();
|
||||
|
||||
var shownEvent = $.Event(Event.SHOWN, {
|
||||
relatedTarget: relatedTarget
|
||||
});
|
||||
|
||||
var transitionComplete = function transitionComplete() {
|
||||
_this2._element.focus();
|
||||
if (_this2._config.focus) _this2._element.focus();
|
||||
$(_this2._element).trigger(shownEvent);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user