Adding and removing additional splitter breaks auto-resize
jhrabows opened this issue · 2 comments
jhrabows commented
To reproduce:
- Create 2 splitters
- Remove one of them
- Re-size browser window
The result is the following error
Uncaught TypeError: Cannot read property 'refresh' of null on this line:
$.each(splitters, function(i, splitter) {
(=>) splitter.refresh();
The root cause is the way destroy() works: it sets the entry in 'splitters' array to 'null'. But $.each will iterate over nulls as well.
jcubic commented
Which version are you using? In 0.16.0 I've replaced null with splitters.splice(id, 1);
in destroy method.
jhrabows commented
Sorry, just noticed that this was fixed in version 16. I was using version 15. Will close.