Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#16087 closed defect (fixed)

dojox.form.Uploader causes dijit parser to fail on IOS mobile devices

Reported by: Mark DeMichele Owned by: Karl Tiedt
Priority: undecided Milestone: 1.8.2
Component: DojoX Uploader Version: 1.7.3
Keywords: Cc:
Blocked By: Blocking:


I have a webapp that should run on an IPad as well as a desktop. I'm using the dojox.form.Uploader mainly for the desktop version, but expected it to just be disabled when being used on an IPad.

I've narrowed down the problem by adding tons of console.log messages since it's not possible to debug on an ipad. When _WidgetBase is setting all the attributes, when on the Ipad it attempts to set the disabled attribute prior to this.inputNode being initialized.

I found a workaround by adding a call to this._createInput inside _setDisabledAttr, but that doesn't seem right. In fact, I question how this control calls this._createInput from various places. Seems like this could be an ordering issue on different devices. Shouldn't the createInput be called at the very end of all attributes. Seems odd recreating it in different places. It seems something doesn't "smell" right here, but maybe I'm not fully understanding the code.

Anyway, this is a bug since if you use this control, you page will fail miserably on an IPhone, IPod, or IPad.

Change History (11)

comment:1 Changed 10 years ago by bill

Component: DojoX FormDojoX Uploader
Owner: changed from dante to Mike Wilcox

comment:2 Changed 10 years ago by Mark DeMichele

I changed my workaround so I didn't have to edit the existing code base. I just created a descendant class and overrode the _setDisabledAttr to do nothing if this.inputNode wasn't created yet.

    function (declare, Uploader) {
        return declare("xl.util.Uploader", [Uploader], {
            _setDisabledAttr: function (disabled) {
                if (!this.inputNode)

I now use xl.util.Uploader.

comment:3 Changed 10 years ago by Karl Tiedt


Try this code, and if it works, I will go ahead and commit it

	_setDisabledAttr: function(disabled){
		// summary:
		//		Internal. To set disabled use: uploader.set("disabled", true);
		if(this.disabled == disabled || !this.inputNode){ return; }
		domStyle.set(this.inputNode, "display", disabled ? "none" : "");

comment:4 Changed 10 years ago by Karl Tiedt

Resolution: fixed
Status: newclosed

In [29752]:

Fixes #16087 -- No longer break if inputNode is not created when disabled, also fixes reference to this._disabled that was inherited from FileUploader?

comment:5 Changed 10 years ago by Karl Tiedt

Milestone: tbd1.8.2

updating milestone (figuring 1.8.1 is too late)

comment:6 Changed 10 years ago by bill

Resolution: fixed
Status: closedreopened

We should leave the ticket open though, until you backport the fix to the 1.8 branch.

comment:7 Changed 10 years ago by bill

Owner: changed from Mike Wilcox to Karl Tiedt
Status: reopenedassigned

comment:8 Changed 10 years ago by Adam Peller


comment:9 Changed 10 years ago by Karl Tiedt

Resolution: fixed
Status: assignedclosed

In [29923]:

Fixes #16087 for 1.8 branch

comment:10 Changed 10 years ago by Karl Tiedt

Ok this is taken care of, I actually ended up having to redo my dev env on my laptop, which kind of put me behind on a few things.

comment:11 Changed 10 years ago by Adam Peller

Thanks, Karl

Note: See TracTickets for help on using tickets.