1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-10 23:54:08 +02:00

Dropdown - Disable applyStyle modifier instead of removing inline style applied by Popper.js

This commit is contained in:
Johann-S
2017-07-04 10:26:25 +02:00
parent 6797e84215
commit 0480a75a5a
2 changed files with 32 additions and 7 deletions

View File

@@ -265,14 +265,10 @@ const Dropdown = (($) => {
}
}
// Disable Popper.js for Dropdown in Navbar
if (this._inNavbar) {
popperConfig.modifiers.AfterApplyStyle = {
enabled: true,
order: 901, // ApplyStyle order + 1
fn: () => {
// reset Popper styles
$(this._menu).attr('style', '')
}
popperConfig.modifiers.applyStyle = {
enabled: !this._inNavbar
}
}
return popperConfig