View Full Version : [FIXED] [4.2.1] fileuploadfield change listener not fired when browsing cancelled.

6 Sep 2013, 12:17 PM

edit: this is a regression from 3.x

Ext version tested:

Ext 4.2.1
Browser versions tested against:

Chrome 28.0.1500.95 (Linux)
Firefox 23 (not reproduced)

In chrome, after clicking to open the file browser, clicking cancel will reset the field (to empty) but will not run the change listener or validator function. In firefox, clicking cancel leaves the field as-is so there is no change and the listener is correctly not run.
Steps to reproduce the problem:

In chrome, create a fileuploadfield
click the button that opens the file browser and select a file, then open
click the button again to open the file browser, but this time click cancel
The result that was expected:

If the textfield is cleared, the change listener should be run
If the textfield remains unchanged, the change listener should not be run
The result that occurs instead:

In chrome, the textfield is cleared and the change listener is not run
Test Case:

Code (untested, something like the following):

Ext.create('Ext.form.field.File', { renderTo: Ext.getBody(), listeners: { change: function(){ debugger; } } });


For now, since there is no listener for this, we validate the form when you attempt to submit it.
Operating System:

A related issue is setting the msgTarget to "qtip" does not work using the neptune theme for fileuploadfield. When an error occurs the border should be red, but it is not. We have an easy workaround so I'm not pursuing this further.

Gary Schlosberg
6 Sep 2013, 1:43 PM
I was definitely able to reproduce this issue, all the way back through 4.0.7 at least, but it is not happening using the latest nightly build of 4.2.2. Hopefully you see the same results.

6 Sep 2013, 3:19 PM
Should be fixed for 4.2.2, EXTJSIV-8124.