mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 05:25:40 +09:00
fix(app): keep the chat scroller pinned to the end while it resizes (#1860)
This commit is contained in:
1 parent
a2099fb0e2
commit
2af0405317
36 files changed
+171
-191
No files matched your search
@@ -341,7 +341,7 @@ export const QuickSwitcherBottomSheet: React.FC<QuickSwitcherBottomSheetProps> =
|
||||
shouldScrollToSelection.current = false;
|
||||
const node = rowRefs.current[keyboardFocusIndex];
|
||||
if (node) {
|
||||
scrollerRef.current?.scrollIntoViewNode({node: node as HTMLElement, padding: 32});
|
||||
scrollerRef.current?.revealElement({node: node as HTMLElement, padding: 32});
|
||||
}
|
||||
}, [keyboardFocusIndex, activeTab]);
|
||||
const sections = useMemo(() => createSections(results), [results]);
|
||||
|
||||
@@ -391,7 +391,7 @@ const QuickSwitcherModalComponent: React.FC = observer(() => {
|
||||
shouldScrollToSelection.current = false;
|
||||
const node = rowRefs.current[keyboardFocusIndex];
|
||||
if (node) {
|
||||
scrollerRef.current?.scrollIntoViewNode({node: node as HTMLElement, padding: 32});
|
||||
scrollerRef.current?.revealElement({node: node as HTMLElement, padding: 32});
|
||||
}
|
||||
}, [keyboardFocusIndex]);
|
||||
const sections = useMemo(() => createSections(results), [results]);
|
||||
|
||||
Reference in new issue
Block a user