Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#12955 closed defect (fixed)

[regression][patch][cla] dojox.form.FileUploader: Browse button becomes unusable after an upload

Reported by: Kenneth G. Franqueiro Owned by: Kenneth G. Franqueiro
Priority: high Milestone: 1.7
Component: DojoX Form Version: 1.6.1
Keywords: FileUploader Cc: Mike Wilcox
Blocked By: Blocking:

Description

Between Dojo 1.5 and Dojo 1.6, the code in the _displayProgress method of dojox.form.FileUploader was changed with regard to hiding this.insideNode; in 1.5, it set left to -2500px, while in 1.6 it sets top.

Problem is, while this was changed for the initial hide operation, it was not properly updated for the respective show operation 8 lines later. This means the node that you click to get the browse popup is never accessible after an upload occurs.

This is observable on the test page dojox/form/tests/test_FileUploaderForm.html - in the left box, type something in Group Name, click "flash select files", pick a file, click "submit", then click "flash select files" again. Rather than pop up the browse window again, it does nothing (or scrolls to the top of the page in some browsers).

I'm attaching a patch to fix this against trunk (1.7), though technically it's a regression from 1.5 to 1.6; I'd be happy to provide a patch and/or commit the fix to both trunk and 1.6 branch, but since FileUploader is deprecated, do we have a strict policy of not fixing things? Seems a damn shame to not fix something so fundamental and leave the component as not only deprecated, but halfway unusable forever, snubbing people who don't have the resources or freedom to migrate.

In case anyone encounters this and needs a workaround, you can dojo.declare an extension to dojox.form.FileUploader and add this:

_displayProgress: function(display) {
	this.inherited(arguments);
	if (display === false) {
		dojo.style(this.insideNode, 'top', '0');
	}
}

Attachments (1)

12955.diff (368 bytes) - added by Kenneth G. Franqueiro 8 years ago.
Fix for the issue in trunk

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by Kenneth G. Franqueiro

Attachment: 12955.diff added

Fix for the issue in trunk

comment:1 Changed 8 years ago by Kenneth G. Franqueiro

Cc: Mike Wilcox added
Milestone: tbd1.7

Discussed with Peller; plan to commit in both trunk and 1.6 branch.

At the same time, am thinking of taking this opportunity to also remove the unused-as-of-1.6 getHiddenWidgets method, but will run it by Mike first.

comment:2 Changed 8 years ago by Kenneth G. Franqueiro

Resolution: fixed
Status: newclosed

(In [24989]) Fixes #12955 - update inline style modification in FileUploader? to match its complement. Also removed getHiddenWidget method as it is unused as of 1.6.

comment:3 Changed 8 years ago by Kenneth G. Franqueiro

(In [24990]) Fixes #12955 in 1.6 branch - update inline style modification in FileUploader? to match its complement. Also removed getHiddenWidget method as it is unused as of 1.6.

Note: See TracTickets for help on using tickets.