Skip to content

Commit

Permalink
Hide popovers when making an element fullscreen
Browse files Browse the repository at this point in the history
This is part of the new pop-up attribute: whatwg/html#8221.

Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
Co-authored-by: Philip Jägenstedt <philip@foolip.org>
  • Loading branch information
3 people authored May 22, 2023
1 parent b3bab96 commit afd56a3
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions fullscreen.bs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,16 @@ stated otherwise it is unset.
<p>All <a for=/>documents</a> have an associated <dfn>list of pending fullscreen events</dfn>, which
is an <a>ordered set</a> of (<a>string</a>, <a>element</a>) <a>tuples</a>. It is initially empty.

<p>To <dfn>fullscreen an <var>element</var></dfn>, set <var>element</var>'s <a>fullscreen flag</a>
and <a for="top layer">add</a> it to its <a>node document</a>'s <a>top layer</a>.
<p>To <dfn>fullscreen an <var>element</var></dfn>:

<ol>
<li><p>Run <a>hide all popovers</a> given <var>element</var>'s <a>node document</a>.

<li><p>Set <var>element</var>'s <a>fullscreen flag</a>.

<li><p><a for="top layer">Add</a> <var>element</var> to <var>element</var>'s <a>node document</a>'s
<a>top layer</a>.
</ol>

<p>To <dfn>unfullscreen an <var>element</var></dfn>, unset <var>element</var>'s
<a>fullscreen flag</a> and <a>iframe fullscreen flag</a> (if any), and <a for=set>remove</a> it from
Expand Down Expand Up @@ -230,6 +238,10 @@ if all of the following are true, and false otherwise:
<li><p><var>element</var>'s <a>node document</a> is <a>allowed to use</a> the "<code><a
data-lt="fullscreen-feature">fullscreen</a></code>" feature.
<!-- cross-process, recursive -->

<li><p><var>element</var> <a for=Element>namespace</a> is not the <a>HTML namespace</a> or
<var>element</var>'s <a>popover visibility state</a> is <a for="popover visibility
state">hidden</a>.
</ul>

<div algorithm="requestFullscreen(options)">
Expand Down

0 comments on commit afd56a3

Please sign in to comment.