Closed Bug 111136 Opened 23 years ago Closed 23 years ago

Form elements with display: none are readonly

Categories

(Core :: Layout: Form Controls, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 108309

People

(Reporter: han.holl, Assigned: john)

Details

Attachments

(1 file)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5+) Gecko/20011029 BuildID: 2001112006 It seems that form elements that have display: none cannot be assigned to with javascript. I haven't tried them all, but it's true for input, text and textarea. It's probably related to load of other bugs, but the clear testcase may help. With visibility hidden they can be updated. Reproducible: Always Steps to Reproduce: 1.Load testcase and play with assign and hide/unhide buttons 2. 3. Actual Results: Field remains unchanged while hidden Expected Results: Field should change IE has updateble undisplayed controls
Attached file Testcase (deleted) —
->jkeiser. See also bug 108307, bug 108308 which are very similar.
Assignee: attinasi → jkeiser
Status: UNCONFIRMED → NEW
Component: Layout → HTML Form Controls
Ever confirmed: true
QA Contact: petersen → madhur
Status: NEW → ASSIGNED
This is not because you can't change the values (you can). It's because, when you hide a control, set its value with JS, and then unhide, the value gets lost due to our save/restore stuff happening in the frame. This is for all intents and purposes a dup. Please reopen if this is not the case for you (it works for me). To verify, if you hide the control, change it with JS, and then submit without unhiding, the value submitted should be the changed value. Similarly, if you look at the value with JS without unhiding the value should be the changed value. *Unhiding the control will always reset it to the value it had when you last hid the control.* This is symptomatic of bug 108309. Note that radio buttons and checkboxes won't work at all yet. That's bug 108307 and bug 108308. *** This bug has been marked as a duplicate of 108309 ***
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
No doubt this has to do with some (unfortunate) Mozilla internals, and I won't bother to reopen this bug, but I'd like to note that it's not very intuitive (hiding just means to make invisible, not saving and restoring), and it's yet another unnecessary incompatibility with IE. Multi browser JS is hard enough as it is. Cheers, Han Holl
We agree, we're working on it :) bug 108309 is really what you want.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: