Open
Bug 634649
Opened 14 years ago
Updated 2 years ago
Bottom of letters such as lower-case Q, Y and G are cut off in text boxes on certain sites
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
NEW
People
(Reporter: cab26715, Unassigned)
References
()
Details
Attachments
(3 files)
117.02 KB,
image/png
|
Details | |
160.85 KB,
image/png
|
Details | |
2.34 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b12pre) Gecko/20110216 Firefox/4.0b12pre
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b12pre) Gecko/20110216 Firefox/4.0b12pre
The bottom portion of lower-case letters, such as G, Y and Q are cut off on the above website and does not occur using Internet Explorer 9 RC. In order to see the bug you need to log into Jibe.com using either a Facebook account or LinkedIn account and click on one of the green Apply buttons. Then, you will be taken to a page where you can enter your contact information for the job (such as your address).
Reproducible: Always
Comment 3•14 years ago
|
||
Can't confirm as it requires linking to my Facebook account in order to sign up, which I'd rather not do.
Could you see if the issue occurs with a new, empty profile:
http://support.mozilla.com/en-US/kb/Basic%20Troubleshooting#w_make-a-new-profile
Does this work fine with 3.6.13?
How about with Chrome?
(Also correcting platform, since it refers to the build of Minefield, not the OS)
Hardware: x86_64 → x86
(In reply to comment #3)
> Can't confirm as it requires linking to my Facebook account in order to sign
> up, which I'd rather not do.
>
> Could you see if the issue occurs with a new, empty profile:
> http://support.mozilla.com/en-US/kb/Basic%20Troubleshooting#w_make-a-new-profile
>
> Does this work fine with 3.6.13?
> How about with Chrome?
>
> (Also correcting platform, since it refers to the build of Minefield, not the
> OS)
*** DOES NOT WORK ***
Minefield (2/17/11) - New Profile
3.6.13 - Default Profile
3.6.13 - New Profile
*** WORKS ***
Google Chrome 9.0.597.98
Internet Explorer 9.0.8080.16413 (Release Candidate)
These are all the 32-Bit versions of the browsers.
Summary: Bottom of letters such as lower-case Q, Y and G are cut off in text boxes → Bottom of letters such as lower-case Q, Y and G are cut off in text boxes on certain sites
Whiteboard: abcdefghijklmnopqrstuvwxyz
Comment 5•14 years ago
|
||
Ok, found STR that does not require signing up.
1) Go to http://www.jibe.com/about/contact
2) Type lowercase characters with descenders (q, g, y etc) in any of the single height text boxes.
Expected:
- The descenders on each character can be seen, per IE/Chrome
Actual:
- The descenders are obscured, per screenshot attached to this bug
Confirmed with Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b12pre) Gecko/20110217 Firefox/4.0b12pre ID:20110217030357 and 3.6.13.
However not sure if this is just a CSS error made by this site?
Marking as new for now, but might get changed to invalid once someone takes a closer look.
Status: UNCONFIRMED → NEW
Component: General → Layout: Form Controls
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → layout.form-controls
Version: unspecified → Trunk
Comment 6•14 years ago
|
||
The page explicitly sets a height of 12px on that input, and the height is too small for the text. We clip the part of the text that's outside the set height.
I wonder whether IE allows the letters to paint in the padding area of the input or something.... That's certainly what Chrome does, as you can tell if you run this on the page in question:
javascript:void(document.querySelectorAll("input.text")[0].style.padding = 0)
which makes Chrome render just like we do. Note that Chrome _does_ clip the text that overlaps the left and right padding, so whatever they're doing here can't really be expressed as CSS as far as I can tell (it's overflow-x:scroll but overflow-y:visible or some such).
What does IE do here in terms of painting text over padding?
Comment 7•14 years ago
|
||
Is that the right thing to do? I thought that we're supposed to do such clipping in order to implement the box model correctly...
Comment 8•14 years ago
|
||
Which box model?
The clipping we do now is consistent with the overflow:hidden div that we put the text in, but clearly webkit is doing something different from that, right?
Comment 9•14 years ago
|
||
(In reply to comment #8)
> Which box model?
>
> The clipping we do now is consistent with the overflow:hidden div that we put
> the text in, but clearly webkit is doing something different from that, right?
Ah, ignore me. You're right.
Do we have any other option to disable scrollbars on the DIV but don't affect the clipping?
Comment 10•14 years ago
|
||
No; if you want something scrollable then we clip to the scrollable area.
And again, I don't understand the weird asymmetry in Webkit with up/down vs left/right and would like to have someone check what IE is actually doing.
Comment 11•14 years ago
|
||
(In reply to comment #6)
> The page explicitly sets a height of 12px on that input, and the height is too
> small for the text. We clip the part of the text that's outside the set
> height.
>
> I wonder whether IE allows the letters to paint in the padding area of the
> input or something.... That's certainly what Chrome does, as you can tell if
> you run this on the page in question:
>
> javascript:void(document.querySelectorAll("input.text")[0].style.padding = 0)
>
> which makes Chrome render just like we do. Note that Chrome _does_ clip the
> text that overlaps the left and right padding, so whatever they're doing here
> can't really be expressed as CSS as far as I can tell (it's overflow-x:scroll
> but overflow-y:visible or some such).
>
> What does IE do here in terms of painting text over padding?
Looks like IE9 RC is doing the same thing than Webkit.
Comment 12•14 years ago
|
||
I think it might be worth trying to do something like that.
Reporter | ||
Comment 13•13 years ago
|
||
This still occurs in the latest Nightly (7/2/11).
Reporter | ||
Comment 14•13 years ago
|
||
Bottom of letters are still cut off in 8/14/11 Nightly.
Comment 15•13 years ago
|
||
So, Boris, is there an easy way to tell Gecko to use parent A as the scrollroot, and parent B as the clipping box?
Comment 16•13 years ago
|
||
Ehsan, I don't believe so, at the moment, but check with roc?
No.
Do we need to put the padding on the inside of the scrollroot, maybe?
Comment 19•13 years ago
|
||
Would that still make the height include the padding? If so, that might work....
I don't understand how <input> height calculations work. It seems that <input> has default box-sizing, but setting "height" definitely doesn't set the height inside the padding+borders...
Comment 21•13 years ago
|
||
Sure seems to work for me. Try this testcase:
<!DOCTYPE html>
<span style="display: inline-block; height: 20px; width: 20px; background: green; padding: 1px 0 1px 0; border: 2px solid green">a</span><input style="height: 20px; -moz-appearance: none; border-style: solid; border-color: green; vertical-align: bottom">
But I was actually talking about the auto height of the input; if people are setting heights manually bets are more or less off anyway, I think, due to differences between UAs in default stylesheets.
Comment 22•13 years ago
|
||
ISTR the behaviour of "height" depending on quirks mode.
Comment 23•13 years ago
|
||
In quirks mode text inputs use border-box sizing.
Comment 24•13 years ago
|
||
So, does it make sense for us to just inherit the padding on the anonymous DIV, and don't set it on the text control frame itself? Something like what this patch does...
Attachment #558986 -
Flags: feedback?(roc)
I doubt this is enough. For one thing, doesn't it change the results of nsTextControlFrame::GetPrefSize?
Comment 26•13 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #25)
> I doubt this is enough. For one thing, doesn't it change the results of
> nsTextControlFrame::GetPrefSize?
Why would it? nsBox::GetPadding gets the padding from the style information, and doesn't call GetUsedPadding, right?
Besides that, do you have any other concerns as well?
Comment 27•13 years ago
|
||
The main concern on my end is how this plays with web pages trying to style the input with a particular height/border/padding. If that works fine and auto sizing works fine, we should be good.
Comment 28•13 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #27)
> The main concern on my end is how this plays with web pages trying to style
> the input with a particular height/border/padding. If that works fine and
> auto sizing works fine, we should be good.
I don't see why it shouldn't. The only thing that this patch should change is the default 1px left/right padding for Win/IE compatibility. We could somehow get that behavior back, but I'm not sure why that was added originally.
Comment 29•13 years ago
|
||
You could look up the blame.... I seem to recall there being a good reason for it, though.
Could we not leave the left/right padding where it is now and just move the top/bottom padding into that div?
(In reply to Ehsan Akhgari [:ehsan] from comment #26)
> (In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #25)
> > I doubt this is enough. For one thing, doesn't it change the results of
> > nsTextControlFrame::GetPrefSize?
>
> Why would it? nsBox::GetPadding gets the padding from the style
> information, and doesn't call GetUsedPadding, right?
Right. Isn't that a problem, because the padding on the inner frame will be added to its preferred size, and then we're adding it again on the nsTextControlFrame?
> Besides that, do you have any other concerns as well?
No.
Comment 31•13 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #29)
> You could look up the blame.... I seem to recall there being a good reason
> for it, though.
It was added in bug 326123. While that bug includes the rationale, it's basically "Here's what IE on Windows does, and we should copy it".
> Could we not leave the left/right padding where it is now and just move the
> top/bottom padding into that div?
Sure, why not? :-)
Comment 32•13 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #30)
> (In reply to Ehsan Akhgari [:ehsan] from comment #26)
> > (In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #25)
> > > I doubt this is enough. For one thing, doesn't it change the results of
> > > nsTextControlFrame::GetPrefSize?
> >
> > Why would it? nsBox::GetPadding gets the padding from the style
> > information, and doesn't call GetUsedPadding, right?
>
> Right. Isn't that a problem, because the padding on the inner frame will be
> added to its preferred size, and then we're adding it again on the
> nsTextControlFrame?
>
> > Besides that, do you have any other concerns as well?
>
> No.
OK, I'll address these comments and will submit a patch to the try server to see if I've missed something.
Comment 33•13 years ago
|
||
> it's basically "Here's what IE on Windows does, and we should copy it".
I think the upshot was that it gave slightly better visual behavior...
Comment 34•13 years ago
|
||
Try run for d31ddfce9ab6 is complete.
Detailed breakdown of the results available here:
http://tbpl.allizom.org/?tree=Try&usebuildbot=1&rev=d31ddfce9ab6
Results (out of 171 total builds):
exception: 2
success: 107
warnings: 46
failure: 16
Builds available at http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/eakhgari@mozilla.com-d31ddfce9ab6
Comment 35•13 years ago
|
||
This is trickier than I realized. On Windows, we fix up the textbox paddings if it doesn't have author specified paddings: <http://mxr.mozilla.org/mozilla-central/source/widget/src/windows/nsNativeThemeWin.cpp#1820>. On Mac and Linux (GTK), the padding is not handled by the theme code. On Linux Qt, we handle the paddings similar to Windows: <http://mxr.mozilla.org/mozilla-central/source/widget/src/qt/nsNativeThemeQt.cpp#375>
What is the best way to handle this correctly?
Updated•12 years ago
|
Attachment #558986 -
Flags: feedback?(roc)
Comment 36•10 years ago
|
||
Another example:
The input-field next to "Find your Device" on http://forum.xda-developers.com/showpost.php?p=53757744&postcount=3750 using the now default "XDA 2015"-forum-theme.
Flags: needinfo?(ehsan.akhgari)
Comment 37•10 years ago
|
||
Not sure what info you're requesting from me. I am not working on this bug any more.
Flags: needinfo?(ehsan.akhgari)
Comment 38•8 years ago
|
||
This S.O. post might add some additional info. Seriously though, anyone who takes on this fix will be a hero.
http://stackoverflow.com/questions/9900018/why-is-firefox-cutting-off-the-text-in-my-input-type-text
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•