fix: Livechat-Add check for scrollPosition before restoring scroll#40123
fix: Livechat-Add check for scrollPosition before restoring scroll#40123shacky wants to merge 1 commit intoRocketChat:developfrom
Conversation
Mobile - after loading widget with delay, website scrolls to top. This is unintended behaviour caused by this line of code. We should not call it without checking if scrollPosition has been saved.
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx,js}📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
Files:
🧠 Learnings (3)📓 Common learnings📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
🔇 Additional comments (1)
WalkthroughAdded a null/undefined check before restoring scroll position during mobile small-screen mode exit. The code now only sets Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested labels
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Mobile - after loading widget with delay, website scrolls to top. This is unintended behaviour caused by this line of code. We should not call it without checking if scrollPosition has been saved.
Summary by CodeRabbit