aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-03-01 22:02:38 -0800
committerAdam Soltys <[email protected]>2026-03-01 22:02:38 -0800
commitb2f9f4441ce253f14d1f5ab9bbb11191446db366 (patch)
tree7ca927ed551a0037d53b85bf10becd1c503d3e0d /src
parent135cb1107c01cea692df7a6bba035f99dca9137d (diff)
downloadcoinos-ui-b2f9f4441ce253f14d1f5ab9bbb11191446db366.tar.gz
coinos-ui-b2f9f4441ce253f14d1f5ab9bbb11191446db366.zip
scroll
Diffstat (limited to 'src')
-rw-r--r--src/routes/(app)/messages/[pubkey]/+page.svelte9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/routes/(app)/messages/[pubkey]/+page.svelte b/src/routes/(app)/messages/[pubkey]/+page.svelte
index e52c398a..d044ecfc 100644
--- a/src/routes/(app)/messages/[pubkey]/+page.svelte
+++ b/src/routes/(app)/messages/[pubkey]/+page.svelte
@@ -174,16 +174,11 @@
let closeSub: (() => void) | undefined;
- // Keep input visible when mobile keyboard opens
+ // Scroll messages to bottom when mobile keyboard opens/closes
onMount(() => {
const vv = window.visualViewport;
if (!vv) return;
- const onResize = () => {
- const active = document.activeElement;
- if (active?.id === "message-contents") {
- active.scrollIntoView({ block: "nearest" });
- }
- };
+ const onResize = () => scrollChat();
vv.addEventListener("resize", onResize);
return () => vv.removeEventListener("resize", onResize);
});