zotero/zotero — pull request #387 by fbennett (2013-09-10 01:29:09+00:00)
Title: Fix potential breakage of drag-and-drop on heavy operations

In MLZ, I was seeing this:

1. Set a heavy style in Export (and enable the Abbreviation Filter to add further processing burden);
2. Drag many items (up to the limit of 50) to a collection;
3. Immediately click in several locations in the center panel while the collection-add operation is in progress and the display is locked.

This could (not always, but frequently) cause drag-and-drop to break for all subsequent operations. The only way to restore it seemed to be a Firefox restart. A side-symptom was that, when the breakage occurred, the entire formatting operation seemed to rerun when the centre pane was clicked (evidenced by a temporary dimming of the display).

I didn't trace the behaviour down to the details, but it seems that an object exposed in the notification queue was getting corrupted or clobbered by the intervening center-panel click event. Resetting the event queue immediately after launching the drag seems to prevent the failure, and the operation rerun no longer occurs.

Not sure if drag-and-drop failures are an issue in mainstream Zotero, and even if so I'm not sure this is the best fix, but it took awhile to figure this out, so I thought I'd send it along just in case it's useful.