From: fat Date: Wed, 13 May 2015 20:22:26 +0000 (-0700) Subject: add "focus" option for turning off modal focusing #16050 X-Git-Tag: v4.0.0-alpha~218^2~2^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ef0e52fd042da2fdf107a3347abab3486a67790;p=thirdparty%2Fbootstrap.git add "focus" option for turning off modal focusing #16050 --- diff --git a/js/src/modal.js b/js/src/modal.js index d0e1ec21bc..88a3c89500 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -29,6 +29,7 @@ const Modal = (($) => { const Default = { backdrop : true, keyboard : true, + focus : true, show : true } @@ -223,7 +224,7 @@ const Modal = (($) => { }) let transitionComplete = () => { - this._element.focus() + if (this._config.focus) this._element.focus() $(this._element).trigger(shownEvent) }