-
Notifications
You must be signed in to change notification settings - Fork 7
Fix overscroll behavior and scroll leak for webchat #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes overscroll behavior in the webchat interface to prevent background body scrolling when interacting with scrollable areas within the webchat, particularly on mobile devices.
- Added
overscrollBehavior: "contain"CSS property to multiple scrollable components - Integrated
react-remove-scrolllibrary to prevent body scroll on mobile viewports when webchat is open - Created a utility function to detect mobile viewports (≤575px width)
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/webchat-ui/utils/isMobile.ts | New utility to detect mobile viewport based on window width |
| src/webchat-ui/components/presentational/previous-conversations/ConversationsList.tsx | Added overscroll containment to conversations list |
| src/webchat-ui/components/presentational/chat-options/ChatOptions.tsx | Added overscroll containment to chat options container |
| src/webchat-ui/components/presentational/WebchatRoot.tsx | Added overscroll containment to webchat root component |
| src/webchat-ui/components/presentational/PrivacyNotice.tsx | Added overscroll containment and formatting cleanup |
| src/webchat-ui/components/plugins/input/menu/PersistentMenu.tsx | Added overscroll containment to persistent menu |
| src/webchat-ui/components/plugins/input/base/BaseInput.tsx | Added overscroll containment to textarea input |
| src/webchat-ui/components/WebchatUI.tsx | Wrapped webchat with RemoveScroll component for mobile, added overscroll containment to layout containers |
| package.json | Added react-remove-scroll dependency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Best case scenario is working good. When I scroll the chat log , the underlying body doesn't scroll. However the auto scroll behaviour we have when I open a conversation seems to scroll the background . I tested that scenario in my phone . I hope the screen recording helps. Its not big UX issue , however if there is way to fix it would be nice to do a follow up ScreenRecording_12-04-2025.10-56-57_1.MP4 |
Success criteria
Please describe what should be possible after this change. List all individual items on a separate line.
How to test
Please describe the individual steps on how a peer can test your change.
Security
Additional considerations
Documentation Considerations
These are hints for the documentation team to help write the docs.