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
diff options
context:
space:
mode:
authorRohit Sharma <rohit2sharma95@gmail.com>2021-02-09 22:04:23 +0300
committerGitHub <noreply@github.com>2021-02-09 22:04:23 +0300
commit29e0c9dfa1c4324e4e2a8cf0b66e27b9e72f09a5 (patch)
treedd1d4cf3ea6fd81a51089919c45c230db6fe6c09 /js/src/dropdown.js
parent91d3da1f3dca3127d50b81928c01d4bd63054269 (diff)
Dropdown — Change the selector to check the use of Popper (#33003)
* Create the popper instance first Make sure that popper instance has been created first and then apply the styling on the dropdown(menu) * Use `data-bs-popper` attibute to check popper Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Diffstat (limited to 'js/src/dropdown.js')
-rw-r--r--js/src/dropdown.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/src/dropdown.js b/js/src/dropdown.js
index 378668a6d0..878a5a9a21 100644
--- a/js/src/dropdown.js
+++ b/js/src/dropdown.js
@@ -181,11 +181,11 @@ class Dropdown extends BaseComponent {
const popperConfig = this._getPopperConfig()
const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false)
+ this._popper = Popper.createPopper(referenceElement, this._menu, popperConfig)
+
if (isDisplayStatic) {
Manipulator.setDataAttribute(this._menu, 'popper', 'static')
}
-
- this._popper = Popper.createPopper(referenceElement, this._menu, popperConfig)
}
// If this is a touch-enabled device we add extra