Closed Bug 60893 Opened 24 years ago Closed 23 years ago

[DUP]display:none affects JavaScript access to form fields

Categories

(Core :: DOM: CSS Object Model, defect, P3)

defect

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: tpowellmoz, Assigned: rods)

References

Details

(Keywords: dataloss, dom1)

Attachments

(1 file)

Using Mozilla/5.0 (Windows; U; WinNT4.0; en-US; m18) Gecko/20001116 and Netscape 6

If fields in a form are hidden with display:none, their values cannot be
accessed through JavaScript. It also appears that switching the display
attribute does not undo this problem. (See test case)

This is probably related to the form submission problem described in bug 34297
Formcontrol/presState problem, over to rods.
Assignee: jst → rods
as far as I can tell, this is an editor bug and I think it is a dup - 
reassigning
Assignee: rods → beppe
I don't follow what you mean when you say this is an editor bug. This code was
created by hand. The code behaves as expected in IE 5 (JavaScript can access
display:none form fields' values). Still occurs in Mozilla 2000112704.

This bug should probably have the correctness and dataloss keywords, so I'm
adding them.
Duplicate of bug 34297
'form controls with style="display: none;" unsuccessful in Mozilla'

And Have to do with bug 52334
Problems with contentDocument and 'display:none' in IFRAMES.

No, this is not a duplicate of bug 34297. Bug 34297 is a problem with form 
submission and fields with display:none. This bug is a problem with the DOM 
(JavaScript access to fields with display:none). They may be related problems 
but they are different.
handing this over to the dom folks to see if they can help resolve this
Assignee: beppe → jst
Sounds like a pres state problem, rods usually deals with those so I'm handing
this over to him.
Assignee: jst → rods
VERIFIED

Platform: PC
OS: Linux 2.2.16
Mozilla Build: 2000122808 Trunk Build


Marking NEW.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows NT → All
Hardware: PC → All
I think this is a dup
Status: NEW → ASSIGNED
Summary: display:none affects JavaScript access to form fields → [DUP]display:none affects JavaScript access to form fields
Keywords: dom1
Component: DOM Level 1 → DOM Style
Taking QA Contact on all open or unverified DOM Style bugs...
QA Contact: janc → ian
Setting milestone to future. This will be addressed when the XBL implementation
of the form elements lands.
Target Milestone: --- → Future
This should be fixed with the complete fix to bug 34297.  Initial values are not
being set when display: none.  Note that with textboxes setting display: block
and then display: none again seems to work (see bug 34297).

At any rate, when we're done with that patch we shouldn't be talking to frames
for their values anymore.

I suggest a bug dependency.
Depends on: 34297
*** Bug 100533 has been marked as a duplicate of this bug. ***
Fixed with bug 34297 landing.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: