I'm using scriptaculous to make page elements resortable through
dragging and I'm running into a problem with z-index and the YUI split
button.  I know it could be difficult to say of the problem is with
the YUI code or scriptaculous code but I think it's scriptaculous code
(or my use of it) and the YUI widgets just make the problem visible.

The problem is that, if I make the items sortable (by clicking "Make
Sortable" in the sample) the drop down menus can appear behind other
items.  The behavior is different in IE7 and FF3.5.

In IE7 the drop down menus work until you click "Make Sortable" which
brings in the scriptaculous code.  Once you've made the items sortable
you can see the menus popup behind other buttons.

In FF3.5 the menus still work after their divs are made sortable, but
if you drag the 2nd item to be the first item, the new 1st items menu
comes up behind the 2nd item's button.

You can see this behavior in my small sample program here:


Here's why I think Scriptaculous is the issue.

In firefox, if you use firebug, you can see that the draggable div
elements have no specified z-index.  After you drag the 2nd item to
the 1st position, firebug will show you that the dragged item now has
an assigned z-index of 0 and you can see that the menu does not work.
It you eliminate that property using firebug you'll see that the menu
now works.

If the dragging code would return the dragged element to it's original
state regarding the z-index, I don't think you'd have the problem.  At
least not in firefox.

In IE7, I'm not sure if the problem is the same.  Since IE7 breaks
without the dragging then it's something that's being done just making
sorting possible.

Both browsers work correctly before you make the items sortable.

Sorry for the long post but I wanted to include all the info that I
have.  You can see all the code at the link above.
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to