]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Add fallback behaviour
authorMartijn Cuppens <martijn.cuppens@gmail.com>
Wed, 9 Dec 2020 18:21:30 +0000 (19:21 +0100)
committerMark Otto <otto@github.com>
Wed, 9 Dec 2020 21:34:51 +0000 (13:34 -0800)
js/src/dropdown.js
js/src/tooltip.js

index 4720ed1ab9224396892d3df4a5689874dab54d70..4d65008f82640ff4a3f6738ec9a926a9d8e850a0 100644 (file)
@@ -298,6 +298,12 @@ class Dropdown extends BaseComponent {
           altBoundary: this._config.flip,
           rootBoundary: this._config.boundary
         }
+      },
+      {
+        name: 'flip',
+        options: {
+          fallbackPlacements: ['top', 'right', 'bottom', 'left']
+        }
       }]
     }
 
index df0f0c19c7dbb4c76c699f782462e810fc73bbca..d348e0a0dabfaf41b05538961cceb1d3c8462092 100644 (file)
@@ -470,7 +470,8 @@ class Tooltip extends BaseComponent {
     const flipModifier = {
       name: 'flip',
       options: {
-        altBoundary: true
+        altBoundary: true,
+        fallbackPlacements: ['top', 'right', 'bottom', 'left']
       }
     }