Skip to content

Commit 70ba5e5

Browse files
authored
Fix Searchbar dropdown-menu positioning (#2567)
Fix initial dropdown-menu positioning by replacing d-none with visibility:hidden. Popper.js cannot calculate the position of elements removed from the DOM with display: none. Let's replace d-none with visibility:hidden, keeping the element in the DOM, allowing Popper.js to correctly calculate its position.
1 parent bac8391 commit 70ba5e5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/vue-components/src/Searchbar.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ export default {
187187
return [
188188
'dropdown-menu',
189189
'search-dropdown-menu',
190-
{ show: this.showDropdown },
191-
{ 'd-none': !this.showDropdown },
190+
{ 'show': this.showDropdown },
191+
{ 'dropdown-menu-hidden': !this.showDropdown },
192192
{ 'dropdown-menu-end': this.menuAlignRight },
193193
];
194194
},
@@ -304,6 +304,10 @@ export default {
304304
visibility: hidden;
305305
overflow: hidden;
306306
}
307+
308+
.dropdown-menu-hidden {
309+
visibility: hidden;
310+
}
307311
</style>
308312

309313
<style>

0 commit comments

Comments
 (0)