FIX: flips popper when top position is chosen incorrectly (#16333)
More precisely, if popper can't position something at the bottom, it will automatically attempt to position it at the top. However we should ensure it doesn’t consider the space under the d-header as valid space, when header's height is taken into consideration if top space is not enough, we should force bottom, and flip it back. This logic is not necessary on modals as the d-header is not present.
This commit is contained in:
parent
8999de6e5b
commit
57b20393ac
|
@ -870,6 +870,21 @@ export default Component.extend(
|
|||
strategy,
|
||||
placement: this.selectKit.options.placement,
|
||||
modifiers: [
|
||||
{
|
||||
name: "flip",
|
||||
enabled: !inModal,
|
||||
options: {
|
||||
padding: {
|
||||
top:
|
||||
parseInt(
|
||||
document.documentElement.style.getPropertyValue(
|
||||
"--header-offset"
|
||||
),
|
||||
10
|
||||
) || 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "offset",
|
||||
options: {
|
||||
|
|
Loading…
Reference in New Issue