Opened 8 years ago

Closed 8 years ago

Last modified 8 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:

Description

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 8 years ago by Mike Wilcox

Resolution: fixed
Status: newclosed

In [26375]:

Fixes #13760 - Fix for Uploader programmatic creation

comment:2 Changed 8 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 since you will sometimes end up calling startup() when the widget is hidden (inside a display:none), or not attached to the DOM at all, it's likely to cause errors on IE with getting/setting the styles, possibly by trying to set styles to a negative number.

Version 0, edited 8 years ago by bill (next)

comment:3 Changed 8 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 8 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 8 years ago by Mike Wilcox

In [26386]:

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

comment:6 Changed 8 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.