fix(panel): thread scroller opts out of scroll anchoring
This commit is contained in:
@@ -37,7 +37,6 @@
|
||||
let loadedAt = $state(new Date(0).toISOString());
|
||||
let scroller = $state<HTMLDivElement | null>(null);
|
||||
let body = $state<HTMLDivElement | null>(null);
|
||||
let end = $state<HTMLDivElement | null>(null);
|
||||
const SETTLE_MS = 2500;
|
||||
const SETTLE_STEP_MS = 120;
|
||||
let settleUntil = 0;
|
||||
@@ -90,7 +89,6 @@
|
||||
if (scroller) {
|
||||
scroller.scrollTop = 0;
|
||||
}
|
||||
end?.scrollIntoView({ block: "end" });
|
||||
}
|
||||
|
||||
async function scrollToBottom() {
|
||||
@@ -208,7 +206,7 @@
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="flex min-h-0 flex-1 flex-col-reverse overflow-y-auto overflow-x-hidden px-3 py-3 @md:px-6"
|
||||
class="flex min-h-0 flex-1 flex-col-reverse overflow-y-auto overflow-x-hidden px-3 py-3 [overflow-anchor:none] @md:px-6"
|
||||
onscroll={() => {
|
||||
if (Date.now() > settleUntil) {
|
||||
pinned = nearBottom();
|
||||
@@ -341,6 +339,5 @@
|
||||
{#each tail as turn (turn.id)}
|
||||
<TurnCard {now} {turn} />
|
||||
{/each}
|
||||
<div aria-hidden="true" class="h-px shrink-0" bind:this={end}></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user