You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Carsten Pieper <ca...@continentale.de> on 2007/08/28 11:56:11 UTC
[TRINIDAD] commandButton with empty text has strange offset in
Firefox
Hi everyone,
we sometimes need buttons without a text (in their disabled state we don't
want to
show the text, just an icon in its disabled form). A code snippet might look
like this
(ignoring icons...):
<tr:panelBorderLayout>
<f:facet name="bottom">
<tr:panelHorizontalLayout halign="right">
<tr:commandButton text=" " disabled="true" />
<tr:spacer width="5" />
<tr:commandButton text="Some button" />
</tr:panelHorizontalLayout>
</f:facet>
</tr:panelBorderLayout>
This gets rendered strangely in Firefox (I'm on Firefox 2.0.0.6): The button
with empty
text (it doesn't seem to matter, if you have a blank in it or don't define
the attribute text
at all) is shifted 1px downwards compared to the button with text (or 2px
for disabled="false").
These are the rendered buttons (no differences in the surrounding td's, so I
omitted them here) are :
<button class="af_commandButton p_AFDisabled" disabled="" type="button">
</button>
and
<button class="af_commandButton"
onclick="submitForm('_id5',1,{source:'_id18:_id25:_id130'});return false;"
type="button">Some button</button>
Using Firebug and inspecting the CSS (tab "Style" in Firebug) I can't find
anything that would
cause this "downshift". However, when examining the layout (tab "Layout" in
Firebug) I detect
a "top offset" of 1px (or 2px for enabled buttons without text) which isn't
there when a text
is defined.
In IE6, everything is rendered as expected (without those offsets).
Any ideas? Is this a bug (and if yes, a Trinidad bug or a Firefox bug)?
Thanks in advance,
Carsten
--
View this message in context: http://www.nabble.com/-TRINIDAD--commandButton-with-empty-text-has-strange-offset-in-Firefox-tf4340799.html#a12365130
Sent from the MyFaces - Users mailing list archive at Nabble.com.