moxiecode/plupload — Issue #431: UI widget + autostart: wrong order of events / timing issues
Author: hujer
Created: 2011-11-30 16:57:09+00:00
State: open

Causing this: http://www.plupload.com/punbb/viewtopic.php?id=684

The problem is that on uploader.init, the `FilesAdded` event is bound, which then fires `QueueChanged` if any actual files were added.

In the UI widget, the autostart event is bound to `FilesAdded`, too. The uploaded file list (actual html) gets updated on `QueueChanged`. The problem is that in `_handleFileStatus`, `case plupload.UPLOADING` the widget is trying to scroll to the actual file being uploaded (using `rowOffset = $('#' + file.id).position().top + $('#' + file.id).height();`) while this list is actually not yet popupulated yielding `$('#' + file.id)` an empty array. Here comes the error reported in the forum.