Closed
Bug 79927
Opened 23 years ago
Closed 22 years ago
submit button with single character value is too small
Categories
(Core :: Layout: Form Controls, defect, P5)
Core
Layout: Form Controls
Tracking
()
VERIFIED
FIXED
Future
People
(Reporter: glob, Assigned: rods)
References
()
Details
Attachments
(6 files, 1 obsolete file)
460 bytes,
text/html
|
Details | |
1.66 KB,
image/gif
|
Details | |
483 bytes,
text/html
|
Details | |
552 bytes,
text/html
|
Details | |
2.10 KB,
patch
|
Details | Diff | Splinter Review | |
1.50 KB,
patch
|
Details | Diff | Splinter Review |
From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9) Gecko/20010505 BuildID: 2001050515 with normal submit buttons, the value of the button (ie what is shown on the rendered html page) has gaps between the text and the side of the widget. if you set the value of a submit button to a single character, the spacing isn't there, and it looks like the character is truncated. Reproducible: Always Steps to Reproduce: <input type="submit" value="x"> Actual Results: the button appears to have it's title truncated. Expected Results: put a gap of a few pixels between the title and the edges of the button.
Comment 1•23 years ago
|
||
-> HTML Form Controls && confirming.
Assignee: trudelle → rods
Status: UNCONFIRMED → NEW
Component: XP Toolkit/Widgets → HTML Form Controls
Ever confirmed: true
QA Contact: jrgm → vladimire
Assignee | ||
Comment 2•23 years ago
|
||
For what is worth we size the same as Nav 4.x, but smaller than IE
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Comment 3•23 years ago
|
||
This also happens with some two-letter buttons, such as the Iridium (77 Ir) button at http://www.csrri.iit.edu/periodic-table.html.
Assignee | ||
Updated•23 years ago
|
Priority: -- → P4
Comment 4•23 years ago
|
||
bz, this is the bug we were talking about. Narrow buttons are too narrow, and wide buttons are too wide.
OS: Windows 2000 → All
Hardware: PC → All
Comment 5•23 years ago
|
||
The interesting thing is that while <input type="button|reset|submit"> is sized wrong, <button> is sized correctly. Attaching testcase.
Comment 6•23 years ago
|
||
Comment 7•23 years ago
|
||
Comment 9•23 years ago
|
||
Comment 10•23 years ago
|
||
OK. I see a few problems here... 1) nsGfxButtonControlFrame::DoNavQuirksReflow has the following comment: // Note: The Quirks sizing includes a 2px border in its calculation of // "desiredSize" This is incorrect. As far as I can tell, the quirks sizing algorithm does nothing of the sort. So we lose 4px of width here for no reason. This is the root of the problem. Not subtracting those 4px off makes us size correctly (or at least not cut off the text). Attaching a patch for this. 2) The left/right padding for these controls in forms.css is 0px! I'm not sure why <button> is rendering as it does, but it would make sense to me to fix <button> to use the same algorithm and make the padding nonzero. IE/Win and IE/Mac both seem to do about 5-10 pixels of padding, as do Opera/Mac and iCab/Mac (see screenshots in bug 108424 and the IE screenshot in this bug). This should be the topic of a separate bug, in my opinion.
Comment 11•23 years ago
|
||
Comment 12•23 years ago
|
||
Oh, and as regards the original testcase... The "bad" cases should be fixed by this patch and some default padding. The "too much" case is there for compatibility with IE/Win, unfotunately. And it's not likely to go away...
Updated•23 years ago
|
Attachment #56494 -
Attachment is obsolete: true
Comment 13•23 years ago
|
||
Comment 14•23 years ago
|
||
Comment 15•23 years ago
|
||
*** Bug 115996 has been marked as a duplicate of this bug. ***
Comment 16•23 years ago
|
||
*** Bug 117606 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 17•23 years ago
|
||
I can live with this patch, but anything else will change the button sizes too much.
Comment 18•23 years ago
|
||
rods: I don't really like the special-casing there. Why does it make sense to subtract out the 2-pixel border when there is one character but not when there are others? Does IE do that? Does it *matter* whether IE does that when it comes to 2 pixels in a form control, which most people render differently anyway? bz: I don't think we should be changing the heights of text/select/submit to be the same in this bug, though I *do* think that should be a new bug. While I personally think it makes a great deal of sense to make them the same size by default, I am not sure of the ramifications to compatibility/page sizing/etc. are. I vote for the obsoleted patch :)
Comment 19•23 years ago
|
||
rods: can the sizing be moved to quirks.css ?
Comment 20•23 years ago
|
||
Why would we move it to the Quirks stylesheet? As far as I can tell, this is not a quirks vs. standard mode compatibility thing. All other browsers size their buttons like bz's patch - I think we should go with that patch.
Comment 21•23 years ago
|
||
Just to clarify. My patch does not make us size like other browsers. It just makes us not cut off the text. So does rods' patch. Other browsers actually put padding around the text too... we will not with my patch, or rods'. The "size as other browsers" issue is still being hashed out (unlike the "cutting off text issue", which everyone agrees is bad).
Comment 22•23 years ago
|
||
*** Bug 119461 has been marked as a duplicate of this bug. ***
Assignee | ||
Updated•23 years ago
|
Priority: P4 → P5
Comment 23•22 years ago
|
||
Is there a reason that this hasn't gone in?
Comment 24•22 years ago
|
||
My patch didn't go in because rods (module owner) was opposed to it. Rod's patch did not go in because it does not really fix the bug in my testing (eg using two lowercase 'L's with variable-width font).
Comment 25•22 years ago
|
||
fixed by bug 167236
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•