Bug Tracker

Opened 11 years ago

Closed 9 years ago

Last modified 7 years ago

#2887 closed bug (invalid)

Mash-up issue with drag and drop and document.writeln

Reported by: michelled Owned by: paul
Priority: major Milestone: 1.2.4
Component: ui Version: 1.2.3
Keywords: Cc:
Blocked by: Blocking:

Description

Dragging something with a 'document.writeln' in it causes the page to break. Here is an example: http://build.fluidproject.org/sakai-imagegallery-tool/tests/fluid-tests/manual/jQueryDnD/writeln.html

To replicate the issue, try to drag 'Item 1'.

I encountered this problem when using jQuery drag an drop in a learning management system that already contained some javascript. We wanted to drag sections of the page around to change the layout. One of the sections of the page had an existing script that contained a call to 'document.writeln'.

Attachments (1)

writeln.html (2.5 KB) - added by michelled 11 years ago.

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by michelled

Attachment: writeln.html added

comment:1 Changed 11 years ago by michelled

I've attached the example because it is being removed from the fluid project svn.

comment:2 Changed 11 years ago by Bosmon

This issue is caused by any <script> blocks present within the dragged material being re-evaluated on reattachment to the docuement - even if they had originally been evaluated. The only reasonable solution would seem to be to remove them from the node children on drag start in the drag manager.

comment:3 Changed 9 years ago by dmethvin

Resolution: invalid
Status: newclosed

This should be filed in the UI bug tracker if still relevant.

http://dev.jqueryui.com

Note: See TracTickets for help on using tickets.