Disabled button isnt grayed out in firefox

2,755 views
Skip to first unread message

Bille

unread,
Sep 20, 2007, 3:05:10 AM9/20/07
to Google Web Toolkit
Hi.

I have a problem with gwt. I have a button which I disable and in
explorer it shows the button grayed out but it doesnt in firefox.

The html for the button looks like this

<button type="button" class="gwt-Button" disabled="">Ændre</button>

When I write a new html page and paste the above in and opens it in
firefox it shows the button is disabled but for some reason it doesnt
work when running with gwt.

Does anyone have an idea what could be wrong?

Cincirely
Bille.

Peter Blazejewicz

unread,
Sep 20, 2007, 5:08:25 PM9/20/07
to Google Web Toolkit
hi Bille,

code generated by GWT Button class in FireFox is at least for me:

<button disabled="disabled" class="gwt-Button" type="button">Disabled
button</button>

Note that generated code is different for IExplore, etc, so you should
not use handwritten html code but simply use Button class which will
write correct code for you,

regards,
Peter

Fede Angeleri

unread,
Sep 20, 2007, 5:13:27 PM9/20/07
to Google-We...@googlegroups.com
Peter, I'm having same problem as Billie and I'm using the Button class and the setEnabled method.

Peter Blazejewicz

unread,
Sep 20, 2007, 6:36:23 PM9/20/07
to Google Web Toolkit
hi,

I'm not sure what issue reason is,
GWT generates above code for me while using 1.4.60,
I've tested using DOM inspector and HTML editor in FireFox (2.0.0.7
windows) and either:
- disabled="disabled"
- disabled=""
worked as expected disabling (grayig out) button in page,

regards,
Peter

On Sep 20, 11:13 pm, "Fede Angeleri" <vito...@gmail.com> wrote:
> Peter, I'm having same problem as Billie and I'm using the Button class and
> the setEnabled method.
>

Bille

unread,
Sep 27, 2007, 2:36:42 AM9/27/07
to Google Web Toolkit
Thanks for the reply.
Im not using handwritten code either. Im using the button class and
the setenabled method as well. The code that is generated by gwt is

<button type="button" class="gwt-Button" disabled="">Ændre</button>

On Sep 20, 11:13 pm, "Fede Angeleri" <vito...@gmail.com> wrote:

> Peter, I'm having same problem as Billie and I'm using the Button class and
> the setEnabled method.
>

Simon Vogensen

unread,
Nov 19, 2007, 7:18:14 AM11/19/07
to Google Web Toolkit
Hi

I had the same problem and found out that if your stylesheet contains
a style setting the color of button - that color will persist even
when FireFox disables the button.

Ex.
button {
color: black; /* The textcolor of disabled buttons is overwritten
by IE but is not by FireFox*/
}

So do not set this style class on your button if it is disabled :-)

Kind regards
Simon Vogensen

Marco

unread,
Dec 5, 2007, 3:35:05 AM12/5/07
to Google Web Toolkit
button {
color: black;
..................
}

button:disabled{
color: gray;
..................
Reply all
Reply to author
Forward
0 new messages