mirror of
https://github.com/mastodon/mastodon.git
synced 2026-08-20 21:54:30 -05:00
Fix mobile navigation scrolling to top while opening (#40042)
This commit is contained in:
@@ -468,7 +468,7 @@ export const CollapsibleNavigationPanel: React.FC = () => {
|
||||
x({ value }: { value: number }) {
|
||||
if (value === 0) {
|
||||
dispatch(openNavigation());
|
||||
} else if (isLtrDir ? value > 0 : value < 0) {
|
||||
} else if (value === OPEN_MENU_OFFSET) {
|
||||
dispatch(closeNavigation());
|
||||
}
|
||||
},
|
||||
@@ -508,6 +508,7 @@ export const CollapsibleNavigationPanel: React.FC = () => {
|
||||
},
|
||||
{
|
||||
from: () => [x.get(), 0],
|
||||
axis: 'x',
|
||||
filterTaps: true,
|
||||
bounds: isLtrDir ? { left: 0 } : { right: 0 },
|
||||
rubberband: true,
|
||||
|
||||
Reference in New Issue
Block a user