Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 299741

Summary: [upload] File selection doesn't work after disabling and enabling upload widget
Product: [RT] RAP Reporter: Stefan Röck <stefan.roeck>
Component: RWTAssignee: Stefan Röck <stefan.roeck>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: jillhan520
Version: 1.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Stefan Röck CLA 2010-01-15 03:55:49 EST
1. Open Upload Demo project in IE8
2. Uncheck Enabled button
3. Check Enabled button
--> Nothing happens at click on "Browse" button
Comment 1 tingel christian CLA 2010-03-25 06:35:07 EDT
Hi Stefan:

I made the following modification to upload.js and UploadButton.js to solve this problem and it seems to be working with no IE8 issues existing till now so far.

Upload.js:

    _onEnabled : function( evt ) {
      qx.ui.core.Widget.flushGlobalQueues();

      // change the enable statement by modifying the "disabled" attribute to solve this bug: 
      // https://bugs.eclipse.org/bugs/show_bug.cgi?id=299741 by tingel christian.
      // The IE8 issue seems to be inexistent here.
      if( evt.getValue() ) {
        //this._uploadField._button._input.style.height
        //  = this._uploadField.getHeight();
        this._uploadField._button._input.style.disabled = "false";        
      } else {
        //this._uploadField._button._input.style.height = "0px";
          this._uploadField._button._input.style.disabled = "true";
      }
    },


UploadButton.js:
_createInputFileTag : function(elem)
{
...

      input.style.zIndex    = "100";
//      input.style.cursor    = "pointer";
      input.style.filter    = "alpha(opacity=0)";

...
}

Tested under IE6/IE8/Firefox3.6.2/Chrome4.1.249.1036
Comment 2 Ralf Sternberg CLA 2011-10-10 17:51:45 EDT
The upload widget is obsolete and will be removed in the future. Use the new FileUpload widget or the FileDialog implementation from the incubator instead.