Fix mobile flyout
This commit is contained in:
@@ -14,9 +14,7 @@ const positionFlyover = (trigger) => {
|
||||
const panelHeight = flyoverPanel.offsetHeight;
|
||||
|
||||
if (isMobile) {
|
||||
const maxTop = Math.max(gap, window.innerHeight - panelHeight - gap);
|
||||
const top = Math.min(rect.bottom + gap, maxTop);
|
||||
flyover.style.setProperty("--flyover-top", `${Math.max(gap, top)}px`);
|
||||
flyover.style.removeProperty("--flyover-top");
|
||||
flyover.style.removeProperty("--flyover-left");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user