Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #9257 (new defect)

Opened 9 months ago

Last modified 9 months ago

Reverting drag and drop with high z-index

Reported by: JMous Assigned to: madrobby
Priority: normal Milestone: 2.x
Component: script.aculo.us Version: edge
Severity: minor Keywords:
Cc:

Description

Begindrag: you drag the object above all objects because of z-index:1000

Enddrag: you see the element dissappear behind the elements which are later in DOM tree on its way to starting position.

Solution. Retain the zindex: 1000 until the revert is finished.

==My own hack:==

*finishDrag function: **moved zindex to org zindex revert parameter set to before revert function. *reverteffect function: ** added: element.style.zIndex = this.zindex; ** added following options to move Effect: *** afterFinish : function(obj){obj.element.zindex = this.originalZ;},originalZ : this.originalZ

Change History

08/13/07 18:56:26 changed by JMous

Sorry, bug in my hack... I now have included the this.zindex and this.originalZ to the reverteffect function. Otherwise the values were undefined due to different scope.

08/13/07 19:17:27 changed by JMous

Some other changes to my own hack because I am a bug reporting n00b...

* change this.zindex remark in last comment to this.options.zindex. (optionZ in following)

* added to revertFunc:

if(!optionZ) element.style.zIndex = this.zindex;

else element.style.zIndex = optionZ;

* Altered extra options to move effect (ignore first bugpost version,originalZ is parameter passed to func)

** afterFinish : function(obj){obj.element.style.zIndex = this.originalZ;}, originalZ : originalZ

I hope this is usefull. Maybe I should consider a dev tool that could output patches...