Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update button activation behaviours #51000

Closed
wants to merge 1 commit into from
Closed

Update button activation behaviours #51000

wants to merge 1 commit into from

Conversation

WeizhongX
Copy link
Contributor

This change does a few things to align with the latest spec, based on the changes in whatwg/html#11053.

  • Reset buttons should only reset the form, not trigger additional popover or command behaviours.
  • Buttons should reflect "button" when command/commandfor attributes are present, with or without a form-owner.
  • Buttons that reflect "button" with command/commandfor attributes that have a form-owner should be no-op; this is a restriction for back-compat that will eventually be lifted. Lift restriction on buttons with implicit type=submit and command/commandfor being no-op whatwg/html#10832 tracks the state of this, and consequently I've added a UseCounter to help figure out when it is safe to make this change.

Bug: 399124617
Change-Id: I684371bb7fc8e0888bcf0713caff212f4806a7c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6304979
Commit-Queue: Keith Cirkel chromium@keithcirkel.co.uk
Reviewed-by: Mason Freed masonf@chromium.org
Cr-Commit-Position: refs/heads/main@{#1425642}

This change does a few things to align with the latest spec, based on
the changes in whatwg/html#11053.

- Reset buttons should _only_ reset the form, not trigger additional
  popover or command behaviours.
- Buttons should reflect "button" when command/commandfor attributes
  are present, with or without a form-owner.
- Buttons that reflect "button" with command/commandfor attributes
  that have a form-owner should be no-op; this is a restriction for
  back-compat that will eventually be lifted.
  whatwg/html#10832 tracks the state of
  this, and consequently I've added a UseCounter to help figure out
  when it is safe to make this change.

Bug: 399124617
Change-Id: I684371bb7fc8e0888bcf0713caff212f4806a7c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6304979
Commit-Queue: Keith Cirkel <chromium@keithcirkel.co.uk>
Reviewed-by: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1425642}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants