Closed Bug 501959 Opened 15 years ago Closed 15 years ago

Setting a style on <input> causes <input type="hidden"> to display

Categories

(Core :: Layout: Form Controls, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 436046

People

(Reporter: dave, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-us) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Safari/530.17
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5

If a general input style is created, input type="hidden" follow the styling. This is not expected behavior. I shouldn't have to add a class="hide" and a style .hide { display:none; } to make hidden fields hide. That's why they are called hidden.

This behavior doesn't happen in WebKit or even IE. It's been in Firefox for ages. Sure, the fix is a class added to a field, but sometimes that's not available (when a script is used to create the actual form, such as a Google Search box.)

Yes, this can be solved with Javascript. It shouldn't have to be. It's a bug. Not a feature. Bug. Fix it. :)

Reproducible: Always

Steps to Reproduce:
1. Create an input - <input type="hidden" value="bet this shows up" />
2. Create a general input style - input { display:block; height: 25px; background-color: #fff; border: 1px solid #000; }
3. Enjoy all the hidden fields being shown all over your form.
Actual Results:  
Inputs of type="hidden" are displayed if there is a general input style in the stylesheet.

Expected Results:  
Inputs of type ="hidden" shouldn't show.
This looks like bug 222482.

See bug 222482 comment 2
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Component: General → Layout: Form Controls
Product: Firefox → Core
QA Contact: general → layout.form-controls
Resolution: --- → DUPLICATE
Version: unspecified → Trunk
Actually, we just went ahead and made it impossible to show the hidden input, because people apparently don't stop and think about what their CSS rules mean...
In Firefox 3.5.3 setting the display property of the INPUT element to a value like 'block' or 'inline-block' will cause hidden inputs to be displayed
Right; bug 436046 is fixed in the Firefox 3.6 alpha and later.
You need to log in before you can comment on or make changes to this bug.