Skip to content

Isolate webchat message scrolling from host scroll hijacking#48

Merged
rockwellll merged 1 commit into
mainfrom
codex/fix-scroll-hijacking
Jun 2, 2026
Merged

Isolate webchat message scrolling from host scroll hijacking#48
rockwellll merged 1 commit into
mainfrom
codex/fix-scroll-hijacking

Conversation

@pelcasandra
Copy link
Copy Markdown
Member

@pelcasandra pelcasandra commented Jun 2, 2026

Summary

  • Added scroll isolation for the webchat message list so host-page smooth-scroll code does not block conversation scrolling.
  • Applied overscroll-behavior, touch-action, and Lenis prevention attributes on the messages container.
  • Stopped wheel and touchmove propagation from inside the message scroller and cleaned those listeners up on disconnect.
  • Added tests covering the new isolation behavior and teardown.

Testing

  • yarn test __tests__/controllers/webchat_controller_test.js
  • yarn build
  • yarn test

Note

Low Risk
Scoped to the messages container scroll UX and event propagation; no auth, API, or data-path changes.

Overview
This PR keeps webchat conversation scrolling working when the host page uses smooth-scroll libraries (e.g. Lenis) that would otherwise capture wheel/touch gestures.

On connect, the messages container gets scroll-containment styles (overscroll-behavior, touch-action, iOS momentum scrolling) and Lenis prevent data attributes. Capture-phase, passive wheel and touchmove listeners call stopHostScrollPropagation so those events do not bubble to the host. Disconnect removes those listeners alongside existing teardown.

The diff adds Jest coverage for setup, propagation blocking, and listener cleanup in webchat_controller_test.js.

Reviewed by Cursor Bugbot for commit 31f79ca. Bugbot is set up for automated code reviews on this repo. Configure here.

@pelcasandra pelcasandra requested a review from rockwellll June 2, 2026 05:45
@rockwellll rockwellll merged commit 8bdbb47 into main Jun 2, 2026
3 checks passed
@rockwellll rockwellll deleted the codex/fix-scroll-hijacking branch June 2, 2026 06:28
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