Skip to content

Conversation

wubocao
Copy link
Contributor

@wubocao wubocao commented Jul 11, 2025

Fix:
When the worksheet is embedded in an HTML page with scrollbars:
1 - When the worksheet has no scrollbars, scrolling the mouse within the worksheet prevents the scrolling of the HTML page.
2 - Optimize the interaction experience when the worksheet has both X and Y scrollbars and one of them reaches the bottom boundary.

Pull Request Checklist

  • Related tickets or issues have been linked in the PR description (or missing issue).
  • Naming convention is followed (do please check it especially when you created new plugins, commands and resources).
  • Unit tests have been added for the changes (if applicable).
  • Breaking changes have been documented (or no breaking changes introduced in this PR).
2025-07-11.19.10.07.mov

@wubocao wubocao requested a review from jikkai as a code owner July 11, 2025 11:22
Copy link

github-actions bot commented Jul 11, 2025

View Deployment

📑 Demo (React@19) Demo (React@16) 📚 Storybook
🔗 Preview link 🔗 Preview link 🔗 Preview link

@wubocao wubocao changed the title Fix/sheet scroll any direction fix: Optimize the logic for preventing scrolling events Jul 11, 2025
@jikkai
Copy link
Member

jikkai commented Jul 11, 2025

Why not disable wheel or similar events for mounted DOM elements 🤔

https://stackblitz.com/edit/univer-sheets-vite-bw8uha1g?file=src%2Fmain.ts

@wubocao
Copy link
Contributor Author

wubocao commented Aug 12, 2025

Why not disable wheel or similar events for mounted DOM elements 🤔

https://stackblitz.com/edit/univer-sheets-vite-bw8uha1g?file=src%2Fmain.ts

I hope its behavior is consistent with the container embedded in the page that has a scroll bar. When the internal container scrolls to the boundary, it should trigger the scrolling of the page. It is not possible to simply prevent the scrolling event.

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