Closed Bug 284862 Opened 19 years ago Closed 18 years ago

Differents width of the input and select items

Categories

(Core :: Layout: Form Controls, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 227463

People

(Reporter: bab007, Unassigned)

References

Details

(Keywords: testcase)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Win98; hu-HU; rv:1.7.6) Gecko/20050223 Firefox/1.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Win98; hu-HU; rv:1.7.6) Gecko/20050223 Firefox/1.0.1

The width of select item differents the width of text in Firefox. Here a small
html code. The width of text is 304 pixels and select is 300 pixels.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"" xml:lang="hu" lang="hu">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <style>
        body {background-color: black;}
        input, select {width: 300px;}
    </style>
</head>
<body>
    <form><br />
        <input type="file" /><br />
        <input type="text" /><br />
        <select>
            <option>First</option>
            <option>Second</option>
        </select>
    </form>
</body>
</html>

Reproducible: Always
Comment on attachment 176446 [details]
Different width of form items (file, text, select)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="hu" xml:lang="hu" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
    <title>Style sheet interpretation in Firefox</title>
    <style>
	input, select {width: 300px;}
    </style>
</head>
<body>
    <p>style sheet:</p>
    <pre>
    input, select {with: 300px;}
    </pre>
    <form>
	<input type="file"/><br />
	<input type="text"/><br />
	<select><option>First</option><option>Second</option></select>
    </form>
</body></html>
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
Entering a reply to unresolve the bug.

Bug is confirmed existing in both Firefox 1.0.7 and Firefox trunk as of today.

Bug has been verified under both Windows 2000 and Windows 2003, no linux nor
macintosh machine is available to me for more thorough checks.

The correct behaviour seems to be the textbox' since it adds the border size
(2+2px) to the set size (300px). The select box, on the other hand, only grows
to 300px. Does it show it using Microsoft's old box model?
I can also confirm this bug on Firefox 1.0.7 under Windows XP as well as FF1.5B1 under OS X 10.4.2.

I agree... 4 pixels are the problem, regardless of CSS width parameter.

(In reply to comment #4)
> Entering a reply to unresolve the bug.
> 
> Bug is confirmed existing in both Firefox 1.0.7 and Firefox trunk as of today.
> 
> Bug has been verified under both Windows 2000 and Windows 2003, no linux nor
> macintosh machine is available to me for more thorough checks.
> 
> The correct behaviour seems to be the textbox' since it adds the border size
> (2+2px) to the set size (300px). The select box, on the other hand, only grows
> to 300px. Does it show it using Microsoft's old box model?
From some experiments (I should upload an attachment, but due to me toying with
it a bit too much, my fox gets much quirky when I try to upload a file, and
badly crashes everytime, I should reinstall...), it seems that both input:file
and selects care not at all from me trying to modify anything of their borders
(input:file accepts a color change, but that's as far as it goes. Select gives
me the finger).

Is there another bug asking for selects and input:file to use the same model as
other elements? that seems to be the source of the bug, a specific model for
those control that doesn't quite behave the way others do.
Assignee: bugs → nobody
Component: Form Manager → Layout: Form Controls
Product: Firefox → Core
QA Contact: form.manager → layout.form-controls
Version: unspecified → Trunk
Setting in Fx's res/forms.css file:
select {
  ...
  -moz-box-sizing: border-box;
  ...
}

The -moz-box-sizing not set for input item in //res/forms.css file but the default value is inline-box. The select control is a border box and the input is a in line box.

Set up border-box value to box-sizing and -moz-box-sizing css properties for input tag.

input {
  box-sizing: border-box;
  -moz-box-sizing: border-box;
}
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
OS: Windows XP → All
Hardware: PC → All
Attached file Testcase #2
File-input issue is a different bug (see bug 52500)

This testcase shows that the problem is in the text-input.
I noticed that this happen only with XHTML DTD.
*** Bug 352597 has been marked as a duplicate of this bug. ***
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: