Disabling button with JS, it will stay disabled after refresh

RESOLVED DUPLICATE of bug 654072

Status

()

Core
DOM: Core & HTML
RESOLVED DUPLICATE of bug 654072
6 years ago
3 years ago

People

(Reporter: mrzephy, Unassigned)

Tracking

6 Branch
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

910 bytes, text/html
Details
(Reporter)

Description

6 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.220 Safari/535.1

Steps to reproduce:

If you disable a submit input button with javascript and then reload the page, the button will still be disabled.
Example HTML to reproduce: http://pastebin.com/5ExFWtT6


Actual results:

The button is disabled no matter how many times you refresh. You need to click in the URL bar and press enter to "really" reload the page with the button enabled.


Expected results:

The button should be enabled after a reload (F5, ctrl+r). This is how it works in all other browsers, e.g. Chrome. And it makes perfect sense for it to work that way.

Comment 1

6 years ago
Created attachment 559864 [details]
testcase

Testcase from the link.

Comment 2

6 years ago
Confirming on the testcase, Win XP.
Status: UNCONFIRMED → NEW
Component: General → DOM: Core & HTML
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → general
Does this require jquery to reproduce?
Disabled state is persisted for buttons across a soft refresh, along with other form control state.  I believe there are existing bugs on that.
Whiteboard: DUPEME

Comment 5

6 years ago
Is it intentional?
We have code to make it explicitly happen, so yes.

The big question is whether it's desired.  And the problem is that that depends on the use cases...  If the button is disabled in response to the values of other inputs on the page, for example, then restoring those values should also restore the disabled state.
(Reporter)

Comment 7

6 years ago
It's not consistent with other browsers. And if you ask me, the coder (JS) should take care of these things, not the browser itself. E.g. run validations on DOM load. There is just too many cases where this is not the desired behavior.

Comment 8

6 years ago
Dup Bug 654072

Comment 9

6 years ago
and Bug 277724,Bug 300364 ?
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 654072

Updated

3 years ago
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.