-
Notifications
You must be signed in to change notification settings - Fork 98
Fix for splitter ids being wrong after destroying splitters #79
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: master
Are you sure you want to change the base?
Conversation
…plitters are created and destroyed.
…litters are created and destroyed.
📝 WalkthroughWalkthroughA decrement operation was removed from the splitter's destroy path, preventing the global active splitter counter from being decreased during destruction. This alters the bookkeeping logic for tracking active splitters and impacts the reset condition for global event listeners. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Tip 🧪 Unit Test Generation v2 is now available!We have significantly improved our unit test generation capabilities. To enable: Add this to your reviews:
finishing_touches:
unit_tests:
enabled: trueTry it out by using the Have feedback? Share your thoughts on our Discord thread! 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 |
|
Can you create a small reproduction of the problem and how the PR resolves the issue? |
This is a view of our application in which we use multiple jquery.splitters. As you can see in the end the wrong splitter is used. Screen.Recording.2026-02-02.at.10.43.18.movThe problem is that when a splitter is destroyed, splitters[id] is set to null, but count is decremented. New splitters can then get the same index. Create Splitter A: id = 0, count = 1, splitters[0] = A |
|
Can you create a small reproduction that I can run? I can't run your video. |
Because counts are used as id's, wrong splitters will be moved if splitters are being destroyed.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.