Note that there are some explanatory texts on larger screens.

plurals
  1. POInternet Explorer 9 drag events block event queue
    primarykey
    data
    text
    <p>I am working on a project where it would be cool to have a drag and drop re orderable list. I got this to work without too much hassle using HTML 5 Drag and Drop. My issue is that the list can be long, and so it is virtually paged or "load on scroll" or whatever you want to call it. This just works by reacting to the scroll event and loading more data via AJAX.</p> <p>So the list has a "bump scroll" feature, i implemented this by having two normally invisible divs at the top and the bottom of the viewport. When they receive a dragover event they just increase or decrease the scroll top of the viewport. Pretty simple. In the fiddle i gave them a background so you can see them. If you try the fiddle in FF or Chrome you can see that as the ajax call completes the UI updates. This does not happen on IE.</p> <pre><code>dojo.byId("bumpScrollDown").connect("dragover", function(bump) { wrapper.scrollTop -= 20; dojo.xhrGet({url: "/echo/json/"}).then(function() { // THIS WILL NEVER FIRE on IE 9 UNTIL THE DRAG // OPERATION IS COMPLETED dojo.byId("log").innerHTML += "callback... "; }); }); </code></pre> <p>The issue is that the drag on IE 9 seems to choke the event loop, so nothing happens - ajax callbacks, timeouts etc will not fire as long as there is a drag going on. This seems like it would screw a lot of things including animations that start on dragover etc. </p> <p>Does anyone know how i could get this to work ? Can i cancel the drag event and start again ? Calling dragDrop() would start the drag again if I could somehow cancel it to allow the ajax callback to fire.</p> <p>You can see on the fiddle that none of the AJAX calls triggered by a drag event will have their callbacks invoked until the drag ends. this does not happen on chrome or FF.</p> <p><a href="http://jsfiddle.net/stevendwood/5VWZk/4/" rel="nofollow">http://jsfiddle.net/stevendwood/5VWZk/4/</a></p> <p>UPDATE: it works better on IE10</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload