Skip to content

fix: pane groups incompletely reset after scroll #104

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

Merged
merged 1 commit into from
Apr 25, 2025

Conversation

Nouzbe
Copy link
Contributor

@Nouzbe Nouzbe commented Apr 24, 2025

This fixes #95.

@@ -129,7 +129,10 @@ export default class ScrollSync extends Component {
this.syncScrollPosition(scrolledPane, pane)
/* Re-attach event listeners after we're done scrolling */
window.requestAnimationFrame(() => {
this.addEvents(pane, groups)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cause of the problem is that pane would belong to multiple groups, and the event listeners would only be reset to some of these groups here.

In reference to the GIF in the linked issue, the pane in pink belongs to ["horizontal", "vertical"]. But when scrolling vertically on the blue grid, we would reset the event listeners of the pink grid to "vertical" and therefore break the horizontal scrolling synchronization between the pink and black grids.

@okonet okonet merged commit 3818b11 into okonet:master Apr 25, 2025
0 of 4 checks passed
Copy link

🎉 This PR is included in version 0.11.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The synchronization does not work when a pane belongs to multiple groups
2 participants