fix: prevent page scroll after canceling table rotation - #5236
Merged
fangsmile merged 1 commit intoJul 27, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤔 This is a ...
🔗 Related issue link
fix #5235
💡 Background and solution
After
RotateTablePluginrotated and restored a table, scrolling inside the table could also scroll the surrounding page.When rotation was canceled,
cancelTransformregistered a translated matrix with the global event transformer. Because the matrix was not an identity matrix, VRender cloned the nativeWheelEvent. CallingpreventDefault()on the transformed event therefore did not cancel the original browser event.This change removes the residual translation when canceling rotation so the transformer receives an identity matrix and preserves the native wheel event. It also adds a regression test that verifies
preventDefault()remains connected to the original event after restoring the table.Validation:
@visactor/vtable-plugins: 10 test suites and 60 tests passed.rush build -t @visactor/vtable-pluginscompleted successfully with existing build warnings.packages/vtable-sheet/__tests__/nested-formula-engine.test.ts; this pull request does not modifypackages/vtable-sheet.📝 Changelog
☑️ Self-Check before Merge
🚀 Summary
copilot:summary
🔍 Walkthrough
copilot:walkthrough