Skip to content

Commit ebbf54f

Browse files
authored
Correct button and input element activation behavior
Reset buttons and inputs no longer trigger popover target activation behavior when there's a form owner. Reset buttons no longer trigger command button activation behavior when there's a form owner. Missing and invalid type buttons no longer trigger command button activation behavior when there's a form owner. Tests: web-platform-tests/wpt#50829.
1 parent f441ea3 commit ebbf54f

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

source

+12-7
Original file line numberDiff line numberDiff line change
@@ -48241,6 +48241,10 @@ interface <dfn interface>HTMLInputElement</dfn> : <span>HTMLElement</span> {
4824148241
<li><p>Run <var>element</var>'s <dfn>input activation behavior</dfn>, if any, and do nothing
4824248242
otherwise.</p></li>
4824348243

48244+
<li><p>If <var>element</var> has a <span>form owner</span> and <var>element</var>'s <span
48245+
data-x="attr-input-type">type</span> attribute is not in the <span
48246+
data-x="attr-input-type-button">Button</span> state, then return.</p></li>
48247+
4824448248
<li><p>Run the <span>popover target attribute activation behavior</span> given <var>element</var>
4824548249
and <var>event</var>'s <span data-x="concept-event-target">target</span>.</p></li>
4824648250
</ol>
@@ -53578,12 +53582,17 @@ interface <dfn interface>HTMLButtonElement</dfn> : <span>HTMLElement</span> {
5357853582
then <span data-x="concept-form-submit">submit</span> <var>element</var>'s
5357953583
<span>form owner</span> from <var>element</var> with <i
5358053584
data-x="submit-user-involvement">userInvolvement</i> set to <var>event</var>'s <span
53581-
data-x="event-uni">user navigation involvement</span>.</p></li>
53585+
data-x="event-uni">user navigation involvement</span>, and return.</p></li>
5358253586

5358353587
<li><p>If <var>element</var>'s <code data-x="attr-button-type">type</code> attribute is in the
5358453588
<span data-x="attr-button-type-reset-state">Reset Button</span> state, then <span
53585-
data-x="concept-form-reset">reset</span> <var>element</var>'s
53586-
<span>form owner</span>.</p></li>
53589+
data-x="concept-form-reset">reset</span> <var>element</var>'s <span>form owner</span>, and
53590+
return.</p></li>
53591+
53592+
<li><p>If <var>element</var>'s <code data-x="attr-button-type">type</code> attribute is in the
53593+
<span data-x="attr-button-type-auto-state">Auto</span> state, then return.</p></li>
53594+
<!-- We do this for compatability and plan to remove this restriction in future, see
53595+
https://github.com/whatwg/html/issues/10832 -->
5358753596
</ol>
5358853597
</li>
5358953598

@@ -53595,10 +53604,6 @@ interface <dfn interface>HTMLButtonElement</dfn> : <span>HTMLElement</span> {
5359553604
<p>If <var>target</var> is not null:</p>
5359653605

5359753606
<ol>
53598-
<li><p>If <var>element</var> has a <span>form owner</span> and <var>element</var>'s <code
53599-
data-x="attr-button-type">type</code> attribute is in the <span
53600-
data-x="attr-button-type-submit-state">Submit Button</span> state, then return.</p></li>
53601-
5360253607
<li><p>Let <var>command</var> be <var>element</var>'s <code
5360353608
data-x="attr-button-command">command</code> attribute.</p></li>
5360453609

0 commit comments

Comments
 (0)