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

Ticket #10423 (closed defect: fixed)

Opened 9 months ago

Last modified 8 months ago

[UNTESTABLE][PATCH] Sortables with ghosting fails if not absolute in IE7

Reported by: Tanrikut Assigned to: thomas@fesch.at
Priority: high Milestone: 2.x
Component: script.aculo.us Version: edge
Severity: normal Keywords: scriptaculous 1.8.0 tiny ready
Cc:

Description

Hi,

With scriptaculous 1.8.0, when you have a Sortable with ghosting:true and if you have position:relative item, after dragging IE7 gives an error saying object does not support this action on dragdrop.js:410. I debugged a little and I think problem with this line "delete this.element._originallyAbsolute;" is, we get this.element._originallyAbsolute=false when we have position:relative items in Sortables and simply trying to delete false causes error.

See attached example.html

Attachments

example.html (1.5 kB) - added by Tanrikut on 12/08/07 12:23:09.
ghosting_ie_fix.diff (1.0 kB) - added by tdd on 01/14/08 15:47:41.
Fixes the issue with IE ghosting on non-absolute elements.

Change History

12/08/07 12:23:09 changed by Tanrikut

  • attachment example.html added.

01/14/08 15:47:08 changed by tdd

  • keywords set to scriptaculous 1.8.0 tiny ready.
  • version set to edge.
  • severity changed from major to normal.
  • summary changed from Sortables with ghosting fails if not absolute in IE7 to [UNTESTABLE][PATCH] Sortables with ghosting fails if not absolute in IE7.

Hey there,

Yes, this issue was reported separately through a broken example in my book (ouch!) on Amazon, and I found the reason for it in code in dragdrop.js that is actually mine: _mea culpa, mea maxima culpa_. The attached patch fixes this while simplifying the code, too.

Core note: because of the process involved, unit testing can't be done (IE-based ghosting-enabled dragging), so you'll just have to take my word for it when I say I tested it all… :-/

Uploading a patch in a second.

01/14/08 15:47:41 changed by tdd

  • attachment ghosting_ie_fix.diff added.

Fixes the issue with IE ghosting on non-absolute elements.

01/21/08 13:36:05 changed by madrobby

  • status changed from new to closed.
  • resolution set to fixed.

(In [8680]) Fixes an issue with IE ghosting on non-absolute elements. Closes #10423.