input type=file value lost on display:block -> display:none -> display:block sequence




16 years ago
2 years ago


(Reporter: bugzilla, Unassigned)



Windows 2000
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)



(1 attachment)



16 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030612
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030612

Setting the 'style' attribute value 'display' of an <input type="file"> tag in
the sequence 'block' -> 'none' -> 'block' results in data loss.
Actually, the HTML is
<div style='display:none'>
 <input type="file">
So the attribute is not on the <input> tag, but on the <div> tag. The CSS
display property is manipulated by JavaScript.

Reproducible: Always

Steps to Reproduce:
1. User enters a value into an <input type="file"> tag. This tag is enclosed by
a <div> tag w/ the "style='display:none'" attribute/value;
2. User hides the <div> tag via "style='display:none'";
3. User reveals the <div> tag via "style='display:block'", which reveals the
enclosed <input type="file"> tag;

Actual Results:  
Loss of the value entered in step one.

Expected Results:  
Keep the value until one of the following form actions: submit, reset, close.

Comment 1

16 years ago
I think reproducing this bug is more complicated than the simple reproducer in
the description. It seems to involve more than one <input type="file"> per form.
I think it involves several <input> tags, and several <div> tags, with one or
more <input> per <div>. All <div> sections are initially hidden. Then, reveal
all <div> sections, put values in the <input> tags, hide all, reveal all. One or
all <input> values will be initialized.

If someone is still interested in assessing this report, I will make available
the web pages involved. Reproducing involves selecting values from a database,
then selecting the appropriate page.

Comment 2

15 years ago
Assignee: general → nobody
Component: Browser-General → Layout
QA Contact: general → core.layout

Comment 3

15 years ago
Jeff, could you make it available?
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:
It works fine for me in Firefox 50 on Linux, so I suspect this bug has been fixed.
Please test again in a recent Firefox and reopen the bug if the problem
still occurs for you.  Thanks!
Last Resolved: 2 years ago
Component: Layout → Layout: Form Controls
Flags: in-testsuite?
Keywords: testcase
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.