diff --git a/index.html b/index.html
index a73705e3..e0d86df3 100644
--- a/index.html
+++ b/index.html
@@ -3,7 +3,7 @@
-
+
Vojo
diff --git a/src/app/features/room/RoomTimeline.tsx b/src/app/features/room/RoomTimeline.tsx
index e44fba6a..fc8e8cfb 100644
--- a/src/app/features/room/RoomTimeline.tsx
+++ b/src/app/features/room/RoomTimeline.tsx
@@ -707,6 +707,26 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
useCallback(() => roomInputRef.current, [roomInputRef])
);
+ // Stay at bottom when scroll container resizes (e.g. Android keyboard open/close)
+ useResizeObserver(
+ useMemo(() => {
+ let mounted = false;
+ return (_entries: ResizeObserverEntry[]) => {
+ if (!mounted) {
+ mounted = true;
+ return;
+ }
+ if (atBottomRef.current) {
+ requestAnimationFrame(() => {
+ const el = getScrollElement();
+ if (el) scrollToBottom(el);
+ });
+ }
+ };
+ }, [getScrollElement]),
+ getScrollElement
+ );
+
const tryAutoMarkAsRead = useCallback(() => {
const readUptoEventId = readUptoEventIdRef.current;
if (!readUptoEventId) {