Skip to content

Maintain scroll position on container resize - #10944

Merged
imanolmzd-svg merged 1 commit into
mainfrom
imanol/prevent-permission-scroll
Jun 5, 2026
Merged

Maintain scroll position on container resize#10944
imanolmzd-svg merged 1 commit into
mainfrom
imanol/prevent-permission-scroll

Conversation

@imanolmzd-svg

@imanolmzd-svg imanolmzd-svg commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Part of #10741

Why

If the user had intentionally scrolled up before approving or rejecting a permission, handling that permission could unexpectedly move them to the bottom.

Implementation

Replace the custom event approach for resuming auto-scroll when the permission dock disappears.

Instead, observe the scroll container's dimensions directly via createResizeObserver in the auto-scroll hook, eliminating the coupling between ChatView and MessageList through window events. The scroll ref is now tracked in the store to enable resize observation alongside the existing content observer.

Screenshots / Video

Before

before-permission-scroll-fix.mov

After

after-permission-scroll-fix.mov

Testing

  • Unit tests pass
  • Manual testing as shown above

…tainer resize

Replace the custom event approach for resuming auto-scroll when the
permission dock disappears. Instead, observe the scroll container's
dimensions directly via createResizeObserver in the auto-scroll hook,
eliminating the coupling between ChatView and MessageList through
window events. The scroll ref is now tracked in the store to enable
resize observation alongside the existing content observer.
@imanolmzd-svg
imanolmzd-svg enabled auto-merge (squash) June 5, 2026 10:46
@imanolmzd-svg
imanolmzd-svg merged commit f5b5797 into main Jun 5, 2026
21 checks passed
@imanolmzd-svg
imanolmzd-svg deleted the imanol/prevent-permission-scroll branch June 5, 2026 11:11
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…tainer resize (Kilo-Org#10944)

Replace the custom event approach for resuming auto-scroll when the
permission dock disappears. Instead, observe the scroll container's
dimensions directly via createResizeObserver in the auto-scroll hook,
eliminating the coupling between ChatView and MessageList through
window events. The scroll ref is now tracked in the store to enable
resize observation alongside the existing content observer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants