Tree and script.aculo.us effect

3 views
Skip to first unread message

theClassConnection

unread,
Jan 29, 2007, 8:42:05 PM1/29/07
to Google Web Toolkit
I'm currently implementing the script.aculo.us effect:

Effect.BlindDown() and Effect.BlindUp(), but I noticed an error in IE
6+.

As stated by script.aculo.us, (http://wiki.script.aculo.us/
scriptaculous/show/Effect.SlideDown)

"
Re: Effect.BlindDown()

You must include a second DIV element, wrapping the contents of the
outer DIV. So, if you call new Effect.SlideDown('x'), your element
must look like this:


<div id="x"><div>contents</div></div>

Because of a bug in Internet Explorer 6 (overflow not correctly
hidden), an additional wrapper div is needed if you want to use these
effects on absolutely positioned elements (wrapper is the absolutely
positioned element, x has position:relative set):


<div id="wrapper"><div id="x"><div>contents</div></div></div>

Works only on block elements.

In Internet Explorer 6.0 there's a problem where floated block level
elements don't animate. If you add a position: relative to the element
it all works though.
"

I've found that the only solution to getting the effect to work when a
Tree is contained in the desired effects panel is to perform the
following "modification":

DOM.setStyleAttribute(tree.getElement(), "position", "");

which essentially sets the positioning of the tree element to default.

This fixes the script error, and the tree seems to function just
fine.

Therefor, I'm wondering why the outermost <div> in the GWT Tree has
position set to relative, and if removing that will cause any
unforeseen error?

Thanks,
tCC

Reply all
Reply to author
Forward
0 new messages