You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove the pending dialog stack in favor of the top layer
This avoids the problems noted in whatwg#2268 with attempting to keep the two
different stacks in sync, and overall simplifies the model. Fixeswhatwg#2268.
This commit also updates the definition of "blocked by a modal dialog"
to account for shadow DOM.
<p>If at any time a <code>dialog</code> element is <span data-x="node is removed from a
57148
57139
document">removed from a <code>Document</code></span>, then if that <code>dialog</code> is in that
57149
-
<code>Document</code>'s <span>pending dialog stack</span>, the following steps must be run:</p>
57150
-
57151
-
<ol>
57152
-
57153
-
<li><p>Let <var>subject</var> be that <code>dialog</code> element and <var>document</var> be the <code>Document</code> from which it is being removed.</p></li>
57154
-
57155
-
<li><p>Remove <var>subject</var> from <var>document</var>'s <span>pending
57156
-
dialog stack</span>.</p></li>
57157
-
57158
-
<li><p>If <var>document</var>'s <span>pending dialog stack</span> is not empty, then let
57159
-
<var>document</var> be <span data-x="blocked by a modal dialog">blocked by the modal
57160
-
dialog</span> that is at the top of <var>document</var>'s <span>pending dialog
57161
-
stack</span>. Otherwise, let <var>document</var> be no longer <span>blocked by a modal
57162
-
dialog</span> at all.</p></li>
57163
-
57164
-
</ol>
57140
+
<code>Document</code>'s <span>top layer</span>, it must be <span
57141
+
data-x="list remove">removed</span> from it.</p>
57165
57142
57166
57143
<p>When the <dfn><code data-x="dom-dialog-close">close()</code></dfn> method is invoked, the user
57167
57144
agent must <span>close the dialog</span> that the method was invoked on. If the method was invoked
<li><p>If the argument <var>result</var> was provided, then set the <code
57185
57162
data-x="dom-dialog-returnValue">returnValue</code> attribute to the value of <var>result</var>.</p></li>
57186
57163
57187
-
<li>
57188
-
57189
-
<p>If <var>subject</var> is in its <code>Document</code>'s <span>pending dialog
57190
-
stack</span>, then:</p>
57191
-
57192
-
<ol>
57193
-
57194
-
<li><p>Remove <var>subject</var> from that <span>pending dialog stack</span>.</p></li>
57195
-
57196
-
<li><p>If that <span>pending dialog stack</span> is not empty, then let <var>subject</var>'s <span>node document</span> be <span data-x="blocked by a modal
57197
-
dialog">blocked by the modal dialog</span> that is at the top of the <span>pending dialog
57198
-
stack</span>. Otherwise, let <var>document</var> be no longer <span>blocked by a modal
57199
-
dialog</span> at all.</p></li>
57200
-
57201
-
</ol>
57202
-
57203
-
</li>
57164
+
<li><p>If <var>subject</var> is in its <code>Document</code>'s <span>top layer</span>, then <span
57165
+
data-x="list remove">remove</span> it.</p></li>
57204
57166
57205
57167
<li><p><span>Queue a task</span> to <span data-x="concept-event-fire">fire an event</span> named
57206
57168
<code data-x="event-close">close</code> at <var>subject</var>.</p></li>
0 commit comments