Bug in UploadWidget's UploadButton.js

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug in UploadWidget's UploadButton.js

John Spackman
Hi all

There's a bug in the UploadButton.js where a listener for "appear" is used to attach the input element to the content element; however, if the button is hidden and then made visible again (or on a Composite that’s hidden, in my case) this causes an exception with Qx 1.2.1 in qx.html.Element.__addChildHelper because the input element has already been added.

The fix nis to change UploadButton.js line 52 from:

to:


Shall I commit a change?

John

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Bug in UploadWidget's UploadButton.js

oetiker
Hi John,

Yesterday John Spackman wrote:

> Hi all
>
> There's a bug in the UploadButton.js where a listener for "appear" is used
> to attach the input element to the content element; however, if the button
> is hidden and then made visible again (or on a Composite that¹s hidden, in
> my case) this causes an exception with Qx 1.2.1 in
> qx.html.Element.__addChildHelper because the input element has already been
> added.
>
> The fix nis to change UploadButton.js line 52 from:
> this.addListener('appear',function(){
> this.getContentElement().addAt(this.__inputEl,0);
> },this);
>
> to:
>
> this.addListenerOnce('appear',function(){
> this.getContentElement().addAt(this.__inputEl,0);
> },this);
>
> Shall I commit a change?
this makes sense, yes please

cheers
tobi

>
> John
>
>
>

--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel