Closed
Bug 292529
Opened 20 years ago
Closed 20 years ago
size of text input area changes on mouseover
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: philn, Unassigned)
References
()
Details
(Keywords: testcase)
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050319 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050319 When moving the cursor into the empty 'Search Text' area the box expands on it's own. Reproducible: Always Steps to Reproduce: 1.move the cursor into the box 2. 3. Actual Results: the box got bigger Expected Results: nothing n/a
Comment 1•20 years ago
|
||
<style>
body { font-family:arial,helvetica,geneva,sans-serif; font-size: 9pt; }
:hover { font-weight:bold;}
</style>
</head><body>
<input name="p_search_text" size="36" maxlength="255" value="" type="text">
</body></html>
If I remove the :hover rule the bug is gone.
Comment 2•20 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050501 Firefox/1.0+
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•20 years ago
|
Component: General → Layout: Form Controls
Product: Mozilla Application Suite → Core
Version: unspecified → 1.0 Branch
Updated•20 years ago
|
Summary: size of text input area changes → size of text input area changes on mouseover
Comment 3•20 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050501 Firefox/1.0+ I see this too. However, is it not expected behaviour? When you hover over the text input, firefox makes the font inside it bold, so the box expands to take this into account. In IE6 the box doesn't expand on hover, but then it doesn't change the font to bold either.
This isn't a bug: input[size] - "The size attribute tells the user agent the initial width of the control. The width is given in pixels except when type attribute has the value "text" or "password". In that case, its value refers to the (integer) number of characters." :hover - "User agents are not required to reflow a currently displayed document due to pseudo-class transitions. For instance, a style sheet may specify that the 'font-size' of an :active link should be larger than that of an inactive link, but since this may cause letters to change position when the reader selects the link, a UA may ignore the corresponding style rule." Mozilla chooses to reflow and that's the result you're seeing.
Comment 5•20 years ago
|
||
re comment 4: > ...its value refers to the (integer) number of characters." <input name="pst" size="8" maxlength="25" value="hover here" type="text"> 'hover here' is stringlength 10, so this definition isn´t really true for fonts with variable width. > Mozilla chooses to reflow and that's the result you're seeing. I don´t think that this one is a good decision, compare the original URL in Opera.
For variable width fonts they use the implementation defined average character width, which is a reasonable thing to do (and also gives correct results for fixed width fonts). If you want to make the width invariant under this kind of style change, use CSS to set the width either in pixels or another unit instead of relying on the size attribute. Setting the weight of the font shouldn't affect the height (and hence the calculation of whatever unit you use) and so the size should be constant.
Comment 7•20 years ago
|
||
This is invalid. Not reflowing on :hover limits things unnecessarily and breaks a lot of sites (which are broken in Opera, but that's their call).
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•