Disable dynamically created button causes static button disabled when refreshing

RESOLVED WORKSFORME

Status

()

Core
DOM
RESOLVED WORKSFORME
8 years ago
10 months ago

People

(Reporter: nanwang, Unassigned)

Tracking

(Depends on: 1 bug, {regression, testcase})

Trunk
x86
Windows XP
regression, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

8 years ago
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
Created attachment 401004 [details]
reporter's testcase

Comment 3

8 years ago
The bug still exists on Firefox 3.5.4 on Windows Vista and OSX.

Comment 4

6 years ago
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
Last Resolved: 10 months ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.