adamwulf/Columnizer-jQuery-Plugin — Issue #31: columnize and split don't interact
Author: chrisgraham
Created: 2012-01-20 02:25:13+00:00
State: open

If some top level text node is split via columnize, split is still subsequently called, and the first node from the next column is moved through.

The result: The node after the text is pulled in half way through the text.

So instead of calling columnize then split, you need to check the return value of columnize. This is what my code ended up as...

```
if (!columnize($col, $destroyable, $col, targetHeight))
{
// do a split, but only if the last item in the column isn't a "dontend"
if(!$destroyable.contents().find(":first-child").hasClass("dontend")){
split($col/*put in here*/, $destroyable/*pull out here*/, $col, targetHeight);
}else{
//	alert("not splitting a dontend");
}
}
```

Also make sure you're returning consistently from columnize, the return behaviour for this function was a real mess. I haven't checked if changes were needed, but I did clean up my copy to make sure it always returned a boolean and never an implied null.