mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
bootstrap_typeahead: Use fixed position for typeaheads.
Since the reference for these typeaheads is has a fixed position unlike say message controls which move on scroll and need to be repositioned, we can use `fixed` position for typeaheads too so there is no jumps when user is trying to scroll when a typeahead is active. This basically replaces the commit where where we remove `fixed` as an argument to `Typeahead` library. We can add it later if any of our typeaheads don't need to be fixed positioned.
This commit is contained in:
@@ -347,6 +347,7 @@ export class Typeahead<ItemType extends string | object> {
|
|||||||
theme: "popover-menu",
|
theme: "popover-menu",
|
||||||
placement: this.dropup ? "top-start" : "bottom-start",
|
placement: this.dropup ? "top-start" : "bottom-start",
|
||||||
popperOptions: {
|
popperOptions: {
|
||||||
|
strategy: "fixed",
|
||||||
modifiers: [
|
modifiers: [
|
||||||
{
|
{
|
||||||
// This will only work if there is enough space on the fallback placement, otherwise
|
// This will only work if there is enough space on the fallback placement, otherwise
|
||||||
|
|||||||
Reference in New Issue
Block a user