F5 does not affect disabled attributes values with javascript written

RESOLVED WORKSFORME

Status

()

Firefox
Untriaged
RESOLVED WORKSFORME
3 years ago
3 years ago

People

(Reporter: tjk9201, Unassigned)

Tracking

40 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.130 Safari/537.36

Steps to reproduce:

When the page has loaded,i enter the following command in console.
$('input[name=sendCodeBtn]').attr('disabled', 'disabled')
$('input[name=sendCodeBtn]').attr('disabled')
Then,press F5,i enter the following command in console.
$('input[name=sendCodeBtn]').attr('disabled')


Actual results:

When the page has loaded,i enter command in console.It print the following.
Object { 0: <input.get-phone-code>, length: 1, prevObject: Object, context: HTMLDocument → tools, selector: "input[name=sendCodeBtn]" }
"disabled"
Then,when i press F5 and enter command in console.It print the following.
"disabled"


Expected results:

When i press F5 and enter command in console.It should print 'undefind'.And when I checked element of 'input[name=sendCodeBtn]' attributes,that disabled attributes values is null.
(Reporter)

Comment 1

3 years ago
sorry,no bug.see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input.
"
disabled

Firefox will, unlike other browsers, by default, persist the dynamic disabled state of an <input> across page loads. Use the autocomplete attribute to control this feature.
"
Status: UNCONFIRMED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.