[Glitch] Fix mobile navigation scrolling to top while opening

Port 62f643348adf8654c1e41dc18042fd659f212fa3 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Sharlayan 2026-08-11 23:02:15 +09:00 committed by Tarrien
parent 1ee541ebfb
commit a138059d26

View File

@ -504,7 +504,7 @@ export const CollapsibleNavigationPanel: React.FC = () => {
x({ value }: { value: number }) { x({ value }: { value: number }) {
if (value === 0) { if (value === 0) {
dispatch(openNavigation()); dispatch(openNavigation());
} else if (isLtrDir ? value > 0 : value < 0) { } else if (value === OPEN_MENU_OFFSET) {
dispatch(closeNavigation()); dispatch(closeNavigation());
} }
}, },
@ -544,6 +544,7 @@ export const CollapsibleNavigationPanel: React.FC = () => {
}, },
{ {
from: () => [x.get(), 0], from: () => [x.get(), 0],
axis: 'x',
filterTaps: true, filterTaps: true,
bounds: isLtrDir ? { left: 0 } : { right: 0 }, bounds: isLtrDir ? { left: 0 } : { right: 0 },
rubberband: true, rubberband: true,