Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

Popover menus: Fix disappearing popover on small screens.

Ritwik1651a85fb025
diff --git a/web/src/popover_menus.ts b/web/src/popover_menus.ts
index e27612103ea..6140c89a111 100644
--- a/web/src/popover_menus.ts
+++ b/web/src/popover_menus.ts
@@ -336,7 +336,10 @@ function get_props_for_popover_centering(
return {
arrow: false,
getReferenceClientRect: () => new DOMRect(0, 0, 0, 0),
- placement: "top",
+ // Since we are resetting the reference to (0,0) in DOM the placement here doesn't matter
+ // Using "bottom" placement as it works well with Popper's positioning system
+ // when the popover exceeds window height
+ placement: "bottom",
popperOptions: {
modifiers: [
{