If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

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

RESOLVED DUPLICATE of bug 436046

Status

()

Core
Layout: Form Controls
RESOLVED DUPLICATE of bug 436046
8 years ago
8 years ago

People

(Reporter: Dave Simon, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

8 years ago
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
Last Resolved: 8 years ago
Component: General → Layout: Form Controls
Product: Firefox → Core
QA Contact: general → layout.form-controls
Resolution: --- → DUPLICATE
Version: unspecified → Trunk
Duplicate of bug: 222482
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...
Duplicate of bug: 436046

Comment 3

8 years ago
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.