Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorMartijn Cuppens <martijn.cuppens@gmail.com>2020-12-09 21:21:30 +0300
committerMark Otto <otto@github.com>2020-12-10 00:34:51 +0300
commitf132400865217ccc83dd31bb53bb8f584a1a6f2f (patch)
tree1c4458753961fc08691a4226a3d4e4c24e1a6f02 /js
parent0f12f5871155b01ab9480d2b3543428dbc6b50e9 (diff)
Add fallback behaviour
Diffstat (limited to 'js')
-rw-r--r--js/src/dropdown.js6
-rw-r--r--js/src/tooltip.js3
2 files changed, 8 insertions, 1 deletions
diff --git a/js/src/dropdown.js b/js/src/dropdown.js
index 4720ed1ab9..4d65008f82 100644
--- a/js/src/dropdown.js
+++ b/js/src/dropdown.js
@@ -298,6 +298,12 @@ class Dropdown extends BaseComponent {
altBoundary: this._config.flip,
rootBoundary: this._config.boundary
}
+ },
+ {
+ name: 'flip',
+ options: {
+ fallbackPlacements: ['top', 'right', 'bottom', 'left']
+ }
}]
}
diff --git a/js/src/tooltip.js b/js/src/tooltip.js
index df0f0c19c7..d348e0a0da 100644
--- a/js/src/tooltip.js
+++ b/js/src/tooltip.js
@@ -470,7 +470,8 @@ class Tooltip extends BaseComponent {
const flipModifier = {
name: 'flip',
options: {
- altBoundary: true
+ altBoundary: true,
+ fallbackPlacements: ['top', 'right', 'bottom', 'left']
}
}