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

Ticket #6996 (new defect)

Opened 1 year ago

Last modified 4 months ago

IE error for second drag

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

Description

I'm preparing a demo for a client and I.E. throws an error after the first drag succeeds.

http://ewdemo.allofzero.com/journal.html is the demo

just take a recipe from the right in the list and drag it to any slot on the calendar. Then try and do it again. You can't do it twice. There's a javascript error and it refuses to drag anymore.

I've tried various combinations of scriptaculous and prototype. The error that is reported is in the prototype file line 2237 character 7. Error type is unknown.

If it is conflicting with other javascript or css, then I can remove them. However the dragging has to work in I.E. (It works fine in all other browsers I've tried. Safari, Firefox, Opera... etc.

thank you!

--Derrek

Attachments

dragdrop10_test.html (1.6 kB) - added by davidw on 02/26/07 22:27:22.
drag drop ie problem

Change History

(in reply to: ↑ description ) 01/11/07 18:48:34 changed by dleute

This is for I.E. 6. I don't have and can't try 7. (it really needs to work in 6 anyway. "It works in 7" isn't a good enough answer for this project)

--Derrek

(in reply to: ↑ description ) 01/11/07 21:17:09 changed by dleute

  • summary changed from I.E. throws error for second drag to Additional information.

I've trace the drag issue to the fact that the drop zone is inside the element that is being updated through AJAX. I'm not sure if it's because the droppable jscript is in the zone as well or because the element is. At any rate, it's dying because the element ceases to exist while prototype javascript is trying to manipulate it. This seems rather odd to me. It also works in other browsers. Is there anything I could do about this?

I found this because I mistyped the ID of the element to update with the request and I.E. started working.

--Derrek

(follow-up: ↓ 4 ) 02/06/07 16:43:57 changed by mislav

  • priority changed from high to normal.
  • severity changed from normal to major.
  • summary changed from Additional information to IE error for second drag.

could you please provide a minimal test case (some HTML and JavaScript that fail for you)?

we will investigate. something similar has been reported before

(in reply to: ↑ 3 ) 02/07/07 03:12:58 changed by dleute

Replying to mislav:

could you please provide a minimal test case (some HTML and JavaScript that fail for you)? we will investigate. something similar has been reported before

this is going to be difficult as I updated that site with a work arround. The drop zones are now the meal titles so the drop zone is never in the ajax update zone. also draggables are not inside droppables so that IE overlapping issue is gone. What it used to do is update the entire week view. now it uses json to update relevant meal sections on drop. I may be able to revert the code on a new domain (subversion).

email me offlist to follow up: d l e u t e AT Geeeeeeee Male (yeah, you figure it out!)

02/26/07 22:27:22 changed by davidw

  • attachment dragdrop10_test.html added.

drag drop ie problem

04/05/07 09:59:01 changed by sgrover

I'm experiencing a similar problem now. You can see a sample of this at http://grover.open2space.com/files/css/test2.htm.

Directions to recreate: 1. load the page 2. Verify a "task" (one of the table cells) can be dragged more than one time. 2. Click the refresh row link. (this replaces the table). 3. Try to drag one of the "task" items.

Undefined error on line 2326. IE does NOT report the proper file, but this appears to be in the Prototype.js file - the position.cumulativeOffset method.

Tested with IE 6 and 7 (same results). Tested with Prototype 1.5.0 and 1.5.1_rc2. Also tested with and without code to clear draggables and droppables, with no effect.

My test files will stay online for a few months. All necessary files are accessible there.

04/25/07 09:31:54 changed by ratibus

Hello

I experienced the same problem with the symfony framework that uses also Prototype and Scriptaculous. I found a workaround here : http://yuweijun.blogspot.com/2007/03/ajax-problem-with-drag-and-drop-for.html

The code of the workaround is the following one :

<script>
if (document.all) { Droppables.drops = [] }
</script>

You have to write this code in the updated fragment which returns the new Droppable zones.

Hope this will help.

01/24/08 16:49:02 changed by kangax

  • owner changed from sam to madrobby.
  • component changed from Prototype to script.aculo.us.