dhtmlxTree: Vertical scroll problem in Firefox but not IE

I’m dealing with a strange little problem with the dhtmlxTree control in Firefox that doesn’t happen in IE…

When the CSS of the containing DIV specifies overflow-y:auto; and uses max-height instead of height (so that the containing DIV collapses to the height of the tree itself when shorter than max-height), the vertical scrollbar never appears (in Firefox) when the tree is expanded beyond the max-height of the containing DIV. It does however work in IE.

To demonstrate, I’ve published a detailed example at:
[url]Networking and Events for Kelley Alumni | Alumni | Indiana Kelley

If anyone can offer assistance (beyond using a fixed height), it would be greatly appreciated!

Thanks.
-Michael

There is no way to fix it. You should initialize tree in container with fixed height

Hmmm… well, not exactly the answer I was looking for, but no matter… I’ve come up with a hack/workaround.

For anyone interested, add the following javascript to the “onOpenEnd” and (possibly) “onClick” events of your tree control via tree.attachEvent:

document.getElementById('divTree').style.overflowY = (document.getElementById('divTree').offsetHeight > 399) ? 'auto' : 'hidden';

– where divTree is your containing DIV, and 400 is your desired max-height.

NOTE: It’s only necessary to add this to your “onClick” event if clicking the item/folder itself collapses or expands the tree. If you only use the little +/- icons to collapse and expand, then “onOpenEnd” will be enough.