Closed
Bug 332841
Opened 19 years ago
Closed 19 years ago
Setting display: block on a hidden input allows borders on those hidden inputs
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: junk, Unassigned)
References
Details
(Keywords: testcase)
Attachments
(1 file, 1 obsolete file)
1.27 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20051229 Camino/1.0b2
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20051229 Camino/1.0b2
Display block (when applied to hidden input elements) is allowing styling of those elements, such as borders.
Reproducible: Always
Steps to Reproduce:
1. Create a form with hidden inputs (a bunch makes them more visible)
2. Add a CSS containing: input {display: block; border: thin solid red;}
3. Make sure the border color in #2 is not the same as you background color
Actual Results:
Load the file, and you should see collapsed borders around your hidden inputs (in the example they would be the color red.
Expected Results:
No borders around hidden inputs, the display mode on a hidden input type should not matter.
This occurs in Camino 1.0b2 and Firefox 1.5.0.1
Attachment #217291 -
Attachment is obsolete: true
Summary: Setting display: block on a hidden input allows borders on thos hidden inputs → Setting display: block on a hidden input allows borders on those hidden inputs
Comment 3•19 years ago
|
||
Hidden inputs are set to display:none in forms.css
Web designers can override that with display:block.
That's not really a bug, it is done this way on purpose.
![]() |
||
Comment 4•19 years ago
|
||
Yep. This is by design.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
Comment 5•19 years ago
|
||
*** Bug 334865 has been marked as a duplicate of this bug. ***
Comment 6•18 years ago
|
||
*** Bug 356054 has been marked as a duplicate of this bug. ***
Comment 7•18 years ago
|
||
*** Bug 360346 has been marked as a duplicate of this bug. ***
Explain how it's not a bug.
According to the w3c HTML 4.01 standard for hidden inputs, they "are not rendered" and so it IS A BUG!
http://www.w3.org/TR/html401/interact/forms.html#hidden-control
Comment 10•18 years ago
|
||
To follow the standard a fix would be to put
display: none !important;
in forms.css for hidden inputs.
Comment 11•18 years ago
|
||
"display: block !important;" in the website's CSS would still overwrite that, though, right?
Comment 12•18 years ago
|
||
No, display: none !important; in forms.css would override every other css, so that would work as a solution.
Opera 9.20 and IE7 don't allow styling of an <input type="hidden"> element (it always stays hidden).
I guess I've changed my mind on this one. It seems to me better to be compatible with IE7 then allowing the hidden input to be styled (although I think that's more logical).
See Also: → https://launchpad.net/bugs/129173
You need to log in
before you can comment on or make changes to this bug.
Description
•