]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
add "focus" option for turning off modal focusing #16050
authorfat <fat@folders.local>
Wed, 13 May 2015 20:22:26 +0000 (13:22 -0700)
committerfat <fat@folders.local>
Wed, 13 May 2015 20:22:26 +0000 (13:22 -0700)
js/src/modal.js

index d0e1ec21bceeef84efab2bfd51372424f9c9025d..88a3c89500ce85df40c7b0b7d34ed4c1668332b9 100644 (file)
@@ -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)
       }