Topic: Bug on rows highlighting

Hi, i saw a bug in your tree with highlighting function. How to reproduce :

1) Go on the demo and select "Tree row highlighting." demo

2) Use Firebug to inspect the "drag me! sorry imposible" node and update the text with a long text, for example "drag me! sorry imposible, holy shit it seems we have a bug". We just want to have an horizontal scroll bar.

3) Now open some nodes to have a vertical scrollbar.

4) Go to the bottom of your tree, and you'll see that mouse and row highlighting are not sync.

Why ? Because your "mif-tree-wrapper" div will have a horizontal scrollbar and your "mif-tree-row-wrapper" will not.
And when you do :

        wrapper.addEvent('scroll', function(event){//sync scroll
            rowWrapper.scrollTop=wrapper.scrollTop;
        });

the two "scrollTop" will not be the same, because of the horizontal scrollbar.

How to fix ? In the function wich bind the node ID from the mouse position, when the two "scrollTop" values are different, just do something like that : this.mouse.y -= 17 to resync.

Bye, and thanks for this awesome tree !

Thumbs up Thumbs down

Re: Bug on rows highlighting

Mif.Tree.Row totaly removed rev89

Re: Bug on rows highlighting

Why ^^ ?

Thumbs up Thumbs down

Re: Bug on rows highlighting

useless