If the max-height is set to -1 for example, the the vertical scrollbar is not added because the div is not constrained with a max-height.
However if you set it to 0, javascript sees a 0 as an empty/default value and uses 300 back on this line:
maxHt = wo.scroller_height || 300;
This change fixes an issue where the last column header gets cut off on MobileSafari (possibly other mobile browsers?).
MobileSafari doesn't allocate horizontal space for the vertical scollbar of vertically-scrolling regions, so the getBarWidth() function correctly returns 0 on iOS. The previous expression of (tsScroller.getBarWidth() || 15) incorrectly evaluates that 0 as "falsy" and sets scroller_barSetWidth to 15, which cuts off the last column header. This change explicitly tests for a null result from tsScroller.getBarWidth() and only applies 15px in that case
I also expanded that section of code a little bit and modified the comment to make it more clear what's going on
* Support multiple tbodies. See #906
* Limit horizontal scrollbar to scrolling section
* Removed widthFixed requirement
* Update RTL support
* Fix column alignment. Fixes#913
* Fix mousewheel scrolling in Firefox. See #135
* Fix filter returning zero to few rows
* Integrate with pager. Fixes#884
* Removed global window resizeEnd variable
* Removed or completely hide extra elements in fixed column
* Hover highlight delays only added for Firefox
* Properly adjust fixed column cell widths
* I know, not an atomic update :(
* Pointer events are now disabled on the fixed column wrapper only.
* Tabbing through fixed column elements now properly ignores visually hidden header cells.