Closed Bug 203014 Opened 23 years ago Closed 23 years ago

Using style.display='none' to hide an INPUT element, and then toggling disabled on it can cause it to reappear

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: james, Assigned: dbaron)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3a) Gecko/20021212 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3a) Gecko/20021212 javascriptref.style.display='none'; on an INPUT element hides it happily, but flipping disabled (to true and then false again) before setting display='none', and then flipping disabled back to true causes the element to appear. Flipping disabled back to false causes it to disappear. Reproducible: Always Steps to Reproduce: 1. In a page containing <input id='one' name='one' value='one'/>; 2. elt = document.getElementById('one'); 3. elt.disabled = true; 4. elt.disabled = false; 5. elt.style.display = 'none'; 6. elt.disabled = true; Actual Results: The INPUT element reappeared. Expected Results: The INPUT element should have remained hidden.
Attached file Test case
This actually demonstrates the bug in my original context, using display: none; to flip between two INPUT elements.
This almost certainly got fixed by the changes made in bug 171830. I can reproduce the problem with a 1.3-era build, but not with a current trunk build...
Confirm that I cannot reproduce this on 1.4a. Seems fixed to me.
Marking so. ;)
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: