Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#13760 closed defect (fixed)

Uploader fails programmatically

Reported by: Mike Wilcox Owned by: Mike Wilcox
Priority: high Milestone: 1.7
Component: DojoX Uploader Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:


Uploader relies upon startup() to chek the size of the button it is transforming, but startup only fires if Uploader is within a container or created via markup

Change History (6)

comment:1 Changed 10 years ago by Mike Wilcox

Resolution: fixed
Status: newclosed

In [26375]:

Fixes #13760 - Fix for Uploader programmatic creation

comment:2 Changed 10 years ago by bill

Users are required to call startup() on all of their widgets, so this wasn't a bug to begin with, but rather a user error.

Also, I haven't tested it but the code will now sometimes call startup() when the widget is hidden (inside a display:none), or not attached to the DOM at all (if the app creates the widget programatically and doesn't immediately attach it to the DOM). In this case it's likely to cause errors on IE with getting/setting the styles, possibly by trying to set styles to a negative number. Admittedly these cases are uncommon.

Last edited 10 years ago by bill (previous) (diff)

comment:3 Changed 10 years ago by Mike Wilcox

So is the correct fix no fix and I should remove it? I wasn't kidding when I expressed my dislike for the startup() concept. As many years as I've been doing Dojo I still don't get it.

comment:4 Changed 10 years ago by bill

Right, users are required to call startup() on all widgets created programatically, after the widgets have been added to the DOM. Note that widgets can be created w/out attachment to the DOM, ex: new dijit.form.Button()

comment:5 Changed 10 years ago by Mike Wilcox

In [26386]:

Refs #13760 - Backing out Uploader programmatic fix - was not needed.

comment:6 Changed 10 years ago by liucougar

In [26681]:

Refs #13760: prevent startup logic from being executed more than once

Note: See TracTickets for help on using tickets.