aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorRohit Sharma <[email protected]>2021-02-04 01:07:25 +0530
committerGitHub <[email protected]>2021-02-03 21:37:25 +0200
commit217d84d6b25c44ea9791e4ca760a35e46f2e0653 (patch)
tree5d2f0da60cecad1e7eb6c0e9387677e6fa50a5f6 /js
parenta1bb65ef49d1373f224e228e67112a675b390720 (diff)
downloadbootstrap-217d84d6b25c44ea9791e4ca760a35e46f2e0653.tar.xz
bootstrap-217d84d6b25c44ea9791e4ca760a35e46f2e0653.zip
Remove the initial margin from dropdown/popover in favor of Popper (#32524)
* Remove the margin from dropdown in favor of Popper - Set the default margin to 0 for dropdowns (To remove the Popper's warning) - Set the required offset in dropdown's defaults * Remove the margin from the popover component Co-authored-by: XhmikosR <[email protected]>
Diffstat (limited to 'js')
-rw-r--r--js/src/dropdown.js2
-rw-r--r--js/src/popover.js1
2 files changed, 2 insertions, 1 deletions
diff --git a/js/src/dropdown.js b/js/src/dropdown.js
index 66ff8cc4f..8fdf45580 100644
--- a/js/src/dropdown.js
+++ b/js/src/dropdown.js
@@ -72,7 +72,7 @@ const PLACEMENT_RIGHT = isRTL ? 'left-start' : 'right-start'
const PLACEMENT_LEFT = isRTL ? 'right-start' : 'left-start'
const Default = {
- offset: [0, 0],
+ offset: [0, 2],
flip: true,
boundary: 'clippingParents',
reference: 'toggle',
diff --git a/js/src/popover.js b/js/src/popover.js
index b5a788961..4c672b518 100644
--- a/js/src/popover.js
+++ b/js/src/popover.js
@@ -25,6 +25,7 @@ const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g')
const Default = {
...Tooltip.Default,
placement: 'right',
+ offset: [0, 8],
trigger: 'click',
content: '',
template: '<div class="popover" role="tooltip">' +