mirror of
https://github.com/bitbaum/chatkit.git
synced 2026-12-04 19:27:40 +01:00
On bitbaum /hire/ at 390x844 the contact box (a ChatThread, a receipt link and the Composer) sits mid-page and the document owns the scroll. The reader's first message pinned the end of the thread to the bottom of the viewport, which scrolled the page UP by about 300px and pushed the composer they were typing in below the fold. What a consumer gets: - When the document owns the scroll, following only moves the page down: with the end of the thread already on screen, nothing moves. A thread or panel that scrolls itself is unchanged, and the jump button still goes to the latest turn in either direction, because the reader asked. - --ck-follow-gap (a length, default 0) on the thread's wrapper or any ancestor leaves that much room under the latest turn when the page follows, so a composer under the thread stays in view. The browser resolves it (rem, em, px, calc); unset, negative or invalid is 0. - While the reader has sent nothing on a page, nothing moves, as before. How it is checked: test/browser-scroll.mjs gains a mid-page fixture (demo/scroll.html?owner=page&greeting&below) at 390 and 1280px. With the composer mid-screen the first message does not scroll the page up and the composer stays on screen; as the thread grows past the foot of the screen the page follows and leaves the end at 0px, 10rem, 6em, 90px and (invalid) 0px above the bottom of the viewport, within 2px. Both checks fail on the previous code; every existing scroll case passes unchanged. Claude-Session: https://claude.ai/code/session_019MDtmsSWTTpVpe4wh3v1sb Co-authored-by: Claude <noreply@anthropic.com>
1 line
572 B
Plaintext
1 line
572 B
Plaintext
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/react/hooks.ts"],"names":[],"mappings":"AAEA,OAAO,EAML,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,SAAO;;iBAUhC,MAAM;EAYhB;AAsBD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM;;;;;;;EAqNrE;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,OAAO,UAAO,QAqBvF;AAED;;;;;;;;gFAQgF;AAChF,wBAAgB,WAAW,CAAC,GAAG,EAAE,SAAS,CAAC,mBAAmB,GAAG,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,SAAM,QAqB/F"} |