Skip to content

Commit

Permalink
Fix #32105 | Fix incorrect note about autocomplete attribute of `<i…
Browse files Browse the repository at this point in the history
…nput>` element of `button` type (#32112)

* fix text

* Update files/en-us/web/html/element/input/button/index.md

Co-authored-by: dawei-wang <[email protected]>

* remove incorrect note

* Update files/en-us/web/html/element/input/button/index.md

Co-authored-by: shubham oulkar <[email protected]>

* Update files/en-us/web/html/element/input/button/index.md

---------

Co-authored-by: dawei-wang <[email protected]>
Co-authored-by: shubham oulkar <[email protected]>
Co-authored-by: Brian Thomas Smith <[email protected]>
Co-authored-by: Dipika Bhattacharya <[email protected]>
  • Loading branch information
5 people authored Mar 7, 2024
1 parent 73d8e95 commit cc032ea
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions files/en-us/web/html/element/button/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ This element's attributes include the [global attributes](/en-US/docs/Web/HTML/G

- : This Boolean attribute prevents the user from interacting with the button: it cannot be pressed or focused.

Firefox, unlike other browsers, [persists the dynamic disabled state](https://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing) of a {{HTMLElement("button")}} across page loads. To control this feature, use the [`autocomplete`](#autocomplete) attribute.

- `form`

- : The {{HTMLElement("form")}} element to associate the button with (its _form owner_). The value of this attribute must be the `id` of a `<form>` in the same document. (If this attribute is not set, the `<button>` is associated with its ancestor `<form>` element, if any.)
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/input/button/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function disableButton() {

{{EmbedLiveSample("Inheriting_the_disabled_state", 650, 100)}}

> **Note:** Firefox will, unlike other browsers, by default, [persist the dynamic disabled state](https://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing) of a {{HTMLElement("button")}} across page loads. Use the [`autocomplete`](/en-US/docs/Web/HTML/Element/button#autocomplete) attribute to control this feature.
> **Note:** Unlike other browsers, Firefox persists the `disabled` state of an `<input>` element even after the page is reloaded. As a workaround, set the `<input>` element's [`autocomplete`](/en-US/docs/Web/HTML/Element/input#autocomplete) attribute to `off`. (See [Firefox bug 654072](https://bugzil.la/654072) for more details.)
## Validation

Expand Down

0 comments on commit cc032ea

Please sign in to comment.