Closed
Bug 677024
Opened 15 years ago
Closed 15 years ago
font size inconsistencies with Google Search field
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: vincent-moz, Unassigned)
Details
Attachments
(1 file)
|
89.17 KB,
image/jpeg
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0 Iceweasel/5.0
Build ID: 20110730084237
Steps to reproduce:
I typed text in the Google search field on http://www.google.fr/ e.g. abcdefghijklmnopqrstuvwxyz.
Actual results:
The text appeared in big characters. When I click somewhere in the field, the caret doesn't appear at the correct position (I suppose Firefox considered that the text was displayed in normal font size and took the corresponding position). When I selected the whole word, the selection appears with normal font size. See snapshot.
Expected results:
The font size should always be the same, possible the normal size.
| Reporter | ||
Comment 1•15 years ago
|
||
Note: this problem didn't appear with Firefox 3.x. It is reproducible without any extension, but doesn't appear in safe mode (-safe-mode option).
Comment 2•15 years ago
|
||
Does the issue occur when running a vanilla Firefox?
https://www.mozilla.com/en-US/firefox/all.html
| Reporter | ||
Comment 3•15 years ago
|
||
Yes, exactly the same problem with:
Mozilla/5.0 (X11; Linux x86_64; rv:5.0.1) Gecko/20100101 Firefox/5.0.1
from ftp://ftp.mozilla.org/pub/firefox/releases/5.0.1/linux-x86_64/en-US/ (I didn't use https://www.mozilla.com/en-US/firefox/all.html as it doesn't give the correct platform (bug 527907).
| Reporter | ||
Comment 4•15 years ago
|
||
I think I've found the cause of the problem: in my userContent.css file I have
input, option, select, textarea { font-size: 10pt !important }
and if I remove this line, the problem no longer occurs. So, it seems that the CSS style selection in Firefox is a bit buggy.
| Reporter | ||
Comment 5•15 years ago
|
||
Well, by "the problem no longer occurs", I just mean that there are no longer inconsistencies. Still, the observed font size is incorrect: big instead of 10pt (my choice should have the precedence due to the "!important").
| Reporter | ||
Comment 6•15 years ago
|
||
The problem comes from the fact that Google uses
.gsfi,.lst{font:17px arial,sans-serif}
in its embedded styles, and the generated source contains the following two sibling elements (both having class "gsfi"):
<input dir="ltr" spellcheck="false" style="border: medium none; padding: 0pt 0pt 0pt 2px; margin: 0pt; width: 100%; left: 0pt; top: 1px; background: url("data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw%3D%3D") repeat scroll 0% 0% transparent; overflow: hidden; position: absolute; z-index: 5; color: transparent;" value="libtool bgus" title="Rechercher" size="41" autocomplete="off" class="gsfi" id="lst-ib" name="q" maxlength="2048" type="text">
<div dir="ltr" id="gs_tad0" style="top: 1px; padding: 0pt; white-space: nowrap; position: absolute; width: 100%; color: silver; z-index: 0; text-align: left; left: 3px;" class="gsfi">the input text</div>
The problem disappears if I remove the "17px" thanks to the Web Developer extension.
Now, this problem seems to be a consequence of Google's ugly (non-standard) way to implement text input, not a bug in Firefox; so I'm closing the bug.
Indeed it seems that the whole input field is transparent (see background and color in the inline style) and the big text probably comes from the sibling div element, which also contains the input text (which is probably added in real time by JavaScript). That's why this text is not affected by my settings
input, option, select, textarea { font-size: 10pt !important }
and appears as big. Then, when I position the cursor or select a part of the input text, this is the style of the "input" element that is taken into account (thus 10pt), hence the inconsistency.
Note: a workaround is to add something like:
#searchform * { font-size: medium !important; }
for Google, e.g. with Stylish, in order to affect all the #searchform descendents.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•