Bug Tracker

Modify

Ticket #2887 (closed bug: invalid)

Opened 5 years ago

Last modified 15 months ago

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:
Blocking: Blocked by:

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

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

Change History

Changed 5 years ago by michelled

comment:1 Changed 5 years ago by michelled

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

comment:2 Changed 5 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 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

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

 http://dev.jqueryui.com

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.