-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Add the ability to not perform dialog focusing steps #2197
Closed
Closed
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56651,9 +56651,13 @@ dictionary <dfn>RelatedEventInit</dfn> : <span>EventInit</span> { | |
interface <dfn>HTMLDialogElement</dfn> : <span>HTMLElement</span> { | ||
[<span>CEReactions</span>] attribute boolean <span data-x="dom-dialog-open">open</span>; | ||
attribute DOMString <span data-x="dom-dialog-returnValue">returnValue</span>; | ||
[<span>CEReactions</span>] void <span data-x="dom-dialog-show">show</span>(); | ||
[<span>CEReactions</span>] void <span data-x="dom-dialog-showModal">showModal</span>(); | ||
[<span>CEReactions</span>] void <span data-x="dom-dialog-show">show</span>(optional <span>DialogShowOptions</span> options); | ||
[<span>CEReactions</span>] void <span data-x="dom-dialog-showModal">showModal</span>(optional <span>DialogShowOptions</span> options); | ||
[<span>CEReactions</span>] void <span data-x="dom-dialog-close">close</span>(optional DOMString returnValue); | ||
}; | ||
|
||
dictionary <dfn>DialogShowOptions</dfn> { | ||
boolean skipInitialFocus = false; | ||
};</pre> | ||
</dd> | ||
</dl><!--TOPIC:HTML--> | ||
|
@@ -56704,21 +56708,31 @@ interface <dfn>HTMLDialogElement</dfn> : <span>HTMLElement</span> { | |
|
||
<dl class="domintro"> | ||
|
||
<dt><var>dialog</var> . <code subdfn data-x="dom-dialog-show">show</code>()</dt> | ||
<dt><var>dialog</var> . <code subdfn data-x="dom-dialog-show">show</code>( [ { skipInitialFocus: true } ] )</dt> | ||
|
||
<dd> | ||
|
||
<p>Displays the <code>dialog</code> element.</p> | ||
|
||
<p>If the <code data-x="">skipInitialFocus</code> option is provided and set to true, then no | ||
<span data-x="dialog focusing steps">additional automatic focusing logic</span> will be | ||
performed. Otherwise, the user agent will attempt to focus the contents of the | ||
<code>dialog</code>, taking into account the <code data-x="attr-fe-autofocus">autofocus</code> | ||
attribute if relevant.</p> | ||
|
||
</dd> | ||
|
||
<dt><var>dialog</var> . <code subdfn data-x="dom-dialog-showModal">showModal</code>()</dt> | ||
<dt><var>dialog</var> . <code subdfn data-x="dom-dialog-showModal">showModal</code>( [ { skipInitialFocus: true } ] )</dt> | ||
|
||
<dd> | ||
|
||
<p>Displays the <code>dialog</code> element and makes it the top-most modal dialog.</p> | ||
|
||
<p>This method honors the <code data-x="attr-fe-autofocus">autofocus</code> attribute.</p> | ||
<p>If the <code data-x="">skipInitialFocus</code> option is provided and set to true, then no | ||
<span data-x="dialog focusing steps">additional automatic focusing logic</span> will be | ||
performed. Otherwise, the user agent will attempt to focus the contents of the | ||
<code>dialog</code>, taking into account the <code data-x="attr-fe-autofocus">autofocus</code> | ||
attribute if relevant.</p> | ||
|
||
</dd> | ||
|
||
|
@@ -56748,20 +56762,22 @@ interface <dfn>HTMLDialogElement</dfn> : <span>HTMLElement</span> { | |
|
||
<div w-nodev> | ||
|
||
<p>When the <dfn><code data-x="dom-dialog-show">show()</code></dfn> method is invoked, the user | ||
agent must run the following steps:</p> | ||
<p>When the <dfn><code data-x="dom-dialog-show">show(<var>options</var>)</code></dfn> method is | ||
invoked, run the following steps:</p> | ||
|
||
<ol> | ||
|
||
<li><p>If the element already has an <code data-x="attr-dialog-open">open</code> attribute, then | ||
abort these steps.</p></li> | ||
<li><p>If this <code>dialog</code> element already has an <code | ||
data-x="attr-dialog-open">open</code> attribute, then abort these steps.</p></li> | ||
|
||
<li><p>Add an <code data-x="attr-dialog-open">open</code> attribute to the <code>dialog</code> | ||
<li><p>Add an <code data-x="attr-dialog-open">open</code> attribute to this <code>dialog</code> | ||
element, whose value is the empty string.</p></li> | ||
|
||
<li><p>Set the <code>dialog</code> to the <span>normal alignment</span> mode.</p></li> | ||
<li><p>Set this <code>dialog</code> to the <span>normal alignment</span> mode.</p></li> | ||
|
||
<li><p>Run the <span>dialog focusing steps</span> for the <code>dialog</code> element.</p></li> | ||
<li><p>If the <code data-x="">skipInitialFocusing</code> member of <var>options</var> is not | ||
present, or if it is present but its value is false, run the <span>dialog focusing steps</span> | ||
for this <code>dialog</code> element.</p></li> | ||
|
||
</ol> | ||
|
||
|
@@ -56776,13 +56792,12 @@ interface <dfn>HTMLDialogElement</dfn> : <span>HTMLElement</span> { | |
the <span>pending dialog stack</span>, it must be <span data-x="top-layer-remove">removed</span> | ||
from the <span>top layer</span>. <ref spec=FULLSCREEN></p> | ||
|
||
<p>When the <dfn><code data-x="dom-dialog-showModal">showModal()</code></dfn> method is invoked, | ||
the user agent must run the following steps:</p> | ||
<p>When the <dfn><code data-x="dom-dialog-showModal">showModal(<var>options</var>)</code></dfn> | ||
method is invoked, the user agent must run the following steps:</p> | ||
|
||
<ol> | ||
|
||
<li><p>Let <var>subject</var> be the <code>dialog</code> element on which the method was | ||
invoked.</p></li> | ||
<li><p>Let <var>subject</var> be this <code>dialog</code> element.</p></li> | ||
|
||
<li><p>If <var>subject</var> already has an <code data-x="attr-dialog-open">open</code> | ||
attribute, then throw an <span>"<code>InvalidStateError</code>"</span> <code>DOMException</code> | ||
|
@@ -56792,7 +56807,8 @@ interface <dfn>HTMLDialogElement</dfn> : <span>HTMLElement</span> { | |
<span>"<code>InvalidStateError</code>"</span> <code>DOMException</code> and abort these | ||
steps.</p></li> | ||
|
||
<li><p>Add an <code data-x="attr-dialog-open">open</code> attribute to <var>subject</var>, whose value is the empty string.</p></li> | ||
<li><p>Add an <code data-x="attr-dialog-open">open</code> attribute to <var>subject</var>, whose | ||
value is the empty string.</p></li> | ||
|
||
<li><p>Set the <code>dialog</code> to the <span>centered alignment</span> mode.</p></li> | ||
|
||
|
@@ -56802,11 +56818,14 @@ interface <dfn>HTMLDialogElement</dfn> : <span>HTMLElement</span> { | |
<li><p>Push <var>subject</var> onto <var>subject</var>'s | ||
<span>node document</span>'s <span>pending dialog stack</span>.</p></li> | ||
|
||
<li><p>Run the <span>dialog focusing steps</span> for <var>subject</var>.</p></li> | ||
<li><p>If the <code data-x="">skipInitialFocusing</code> member of <var>options</var> is not | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. |
||
present, or if it is present but its value is false, run the <span>dialog focusing steps</span> | ||
for <var>subject</var>.</p></li> | ||
|
||
</ol> | ||
|
||
<p>The <dfn>dialog focusing steps</dfn> for a <code>dialog</code> element <var>subject</var> are as follows:</p> | ||
<p>The <dfn>dialog focusing steps</dfn> for a <code>dialog</code> element <var>subject</var> are | ||
as follows:</p> | ||
|
||
<ol> | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be skipInitialFocus right ?