Closed Bug 516920 Opened 15 years ago Closed 9 years ago

Disable dynamically created button causes static button disabled when refreshing

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: koblin, Unassigned)

References

(Depends on 1 open bug)

Details

(Keywords: regression, testcase)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 Creating a disabled button element dynamically using javascript in HTML, and click "Refresh" on the page, it causes another static button disabled unexpectedly. Please refer to the simplified HTML sample in the Steps to Reproduce section. Reproducible: Always Steps to Reproduce: 1. Save the following simplified HTML as a file and open it by Firefox. 2. Click "Refresh" button on the toolbar of Firefox. Sample HTML: <html> <body> <div id='d'></div> <button>static</button> <script type='text/javascript'> var btn = document.createElement('button'); btn.disabled = true; btn.innerHTML = "dynamic"; document.getElementById('d').appendChild(btn); </script> </body> </html> Actual Results: Both buttons are disabled after Step 2. Expected Results: The static button is enabled and the dynamic button is disabled. We have been fighting against this issue for whole day long and eventually we think it's a bug in Firefox. This happens only when you click the "Refresh" button of Firefox. Pressing Enter within the URL field refreshes the whole page and there's no such problem. This issue has caused severe problem for our project and we need to forfeit a whole solution. Feedback are welcome. We can reproduce the problem with the latest Firefox 3.5.3, as well as 3.0.13 and 3.0.14, on windows XP.
This bug is reproducible on Windows Vista with latest trunk, not with Firefox 2.
Status: UNCONFIRMED → NEW
Component: General → DOM
Ever confirmed: true
Keywords: regression, testcase
Product: Firefox → Core
QA Contact: general → general
Version: unspecified → Trunk
The bug still exists on Firefox 3.5.4 on Windows Vista and OSX.
If bug 654072 is fixed, we won't attempt to restore the disabled state, so I guess this will be fixed as well.
Depends on: 654072
Firefox, 50.0a1, Build ID 20160616030228 User Agent Mozilla/5.0 (Windows NT 5.1; rv:50.0) Gecko/20100101 Firefox/50.0 I have tested this issue on the latest Firefox (47.0) release and latest Nightly (50.0a1) build and is no longer reproducible. I have opened the provided test case and after page refresh the "dynamic" button is disabled and the "static" button is active. I can confirm that this issue is reproducible on a older version of Firefox (3.5). After page refresh the both buttons are disabled. Considering this, I will mark this as Resolved-Worksforme. If anyone can still reproduce it, feel free to reopen the issue and provide more information.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
I am glad that this bug is now fixed because it was directly or indirectly affecting many websites like youtube.com, https://snapchatonlinelogin.org
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: