Closed
Bug 180085
Opened 22 years ago
Closed 22 years ago
[FIX]button text is shifted to right
Categories
(Core :: Layout: Form Controls, defect, P1)
Core
Layout: Form Controls
Tracking
()
RESOLVED
FIXED
mozilla1.3alpha
People
(Reporter: axlrey, Assigned: bzbarsky)
References
(Depends on 1 open bug, )
Details
(Keywords: regression, testcase)
Attachments
(6 files, 4 obsolete files)
424 bytes,
text/html
|
Details | |
423 bytes,
text/html
|
Details | |
485 bytes,
text/html
|
Details | |
1.69 KB,
text/html
|
Details | |
56.26 KB,
image/jpeg
|
Details | |
10.31 KB,
patch
|
john
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3a) Gecko/20021113 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3a) Gecko/20021113 Text in small "ok" button in top left corner text is not centered. Whole text is shifted to right. Part of letter "k" is not visible. 1.2b Builds showing this correctly. Reproducible: Always Steps to Reproduce: 1. Go To URL 2. Watch "ok" button int top left corner Testcase will follow.
Reporter | ||
Comment 1•22 years ago
|
||
Reporter | ||
Comment 2•22 years ago
|
||
setting button width to 20px give very strange results
Comment 3•22 years ago
|
||
Confirming on Linux, (it behaves like that for about 2 days). When you specify only width and no padding input takes 100% of available space (second case in testcase)
Updated•22 years ago
|
Keywords: regression,
testcase
Comment 4•22 years ago
|
||
I also see this in the test cases.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 5•22 years ago
|
||
Confirming with 2002111308 on win98se. I also noticed that adding padding: 0; to input[type=button], input[type=submit], input[type=reset] is an effective workaround. However, those characteristics are not inherited by input[type=button]:hover, input[type=submit]:hover, input[type=reset]:hover or by input[type=button]:hover:active, input[type=submit]:hover:active, input[type=reset]:hover:active and they should be, correct?
Assignee | ||
Comment 6•22 years ago
|
||
So the problem here is that buttons have box-sizing border-box. So when you set the width, that sets the width of the whole thing, including borders, padding, etc. The left+padding on inputs is about 20px or so. So setting anything less than 20px as the width will lead to weird results (that need to be fixed). Setting something that's _bigger_ than 20px is a separate issue... The only reason the code on that site works with older builds is that those have no built-in left/right padding. If we _do_ have padding, border-box sizing means that we're not leaving enough space for the text. Could someone test this with a browser other than WinIE? In particular, I would like to know how MacIE handles this. jkeiser? Thoughts?
Assignee: form → bzbarsky
OS: Windows 2000 → All
Priority: -- → P1
Hardware: PC → All
Target Milestone: --- → mozilla1.3alpha
Assignee | ||
Comment 7•22 years ago
|
||
Oh, an no. hovered buttons should not "inherit" the padding; if you specify padding there, you're on your own to make sure the hover and active effects still work right.
Assignee | ||
Comment 8•22 years ago
|
||
I thought I'd cced jkeiser... ;)
Assignee | ||
Comment 9•22 years ago
|
||
OK. I think the right solution is to more or less center the text inside the button no matter what the width is (in other words, decrease the left offset as needed so that the text is centered in those testcases). Need to not break the :hover stuff in the process, of course.
Assignee | ||
Comment 10•22 years ago
|
||
And not clear what the right solution for <button> is.
Assignee | ||
Comment 11•22 years ago
|
||
Comment 12•22 years ago
|
||
Assignee | ||
Comment 13•22 years ago
|
||
Assignee | ||
Comment 14•22 years ago
|
||
Yay webmasters working around IE broken-ness and breaking in every other browser....
Attachment #106262 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Attachment #106267 -
Flags: review?(jkeiser)
Assignee | ||
Comment 15•22 years ago
|
||
Attachment #106267 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Attachment #106267 -
Flags: review?(jkeiser)
Assignee | ||
Updated•22 years ago
|
Attachment #106271 -
Flags: review?(jkeiser)
Comment 16•22 years ago
|
||
Comment on attachment 106271 [details] [diff] [review] by popular request.... r=jkeiser with a comment explaining how the spaces thing is TEMPORARY and caused largely by the fact that our focus border makes us take up an excessive amount of space for the border.
Attachment #106271 -
Flags: review?(jkeiser) → review+
Assignee | ||
Comment 17•22 years ago
|
||
Attachment #106271 -
Attachment is obsolete: true
Assignee | ||
Comment 18•22 years ago
|
||
Attachment #106367 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Attachment #106368 -
Flags: superreview?(roc+moz)
Comment 19•22 years ago
|
||
Comment on attachment 106368 [details] [diff] [review] Better comment r=jkeiser, I just wish the comment was more verbose ;)
Attachment #106368 -
Flags: review+
Assignee | ||
Updated•22 years ago
|
Summary: button text is shifted to right → [FIX]button text is shifted to right
Comment on attachment 106368 [details] [diff] [review] Better comment sr=roc+moz
Attachment #106368 -
Flags: superreview?(roc+moz) → superreview+
Assignee | ||
Comment 21•22 years ago
|
||
*** Bug 180471 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 22•22 years ago
|
||
fixed
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 23•17 years ago
|
||
We should migrate these tests to reftest or something.
Flags: in-testsuite?
Assignee | ||
Comment 24•17 years ago
|
||
I checked in a reftest, but I'm not sure it's really good enough to test this... I'm not sure any of our existing test suites can _really_ test the expectations here. :( At least not without a good bit more in the way of assumptions about our form controls focuspaddings, etc.
You need to log in
before you can comment on or make changes to this bug.
Description
•