#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: |
Description
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
Component: | DojoX Form → DojoX Uploader |
---|---|
Owner: | changed from dante to Mike Wilcox |
comment:2 Changed 10 years ago by
comment:3 Changed 10 years ago by
demi,
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; } this.inherited(arguments); domStyle.set(this.inputNode, "display", disabled ? "none" : ""); },
comment:5 Changed 10 years ago by
Milestone: | tbd → 1.8.2 |
---|
updating milestone (figuring 1.8.1 is too late)
comment:6 Changed 10 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
We should leave the ticket open though, until you backport the fix to the 1.8 branch.
comment:7 Changed 10 years ago by
Owner: | changed from Mike Wilcox to Karl Tiedt |
---|---|
Status: | reopened → assigned |
comment:10 Changed 10 years ago by
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.
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.
I now use xl.util.Uploader.