From afd56a35f409e5595dd861f41390a1016ebd6aa2 Mon Sep 17 00:00:00 2001 From: Joey Arhar Date: Sun, 21 May 2023 23:59:12 -0700 Subject: [PATCH] Hide popovers when making an element fullscreen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is part of the new pop-up attribute: https://github.com/whatwg/html/pull/8221. Co-authored-by: Anne van Kesteren Co-authored-by: Philip Jägenstedt --- fullscreen.bs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/fullscreen.bs b/fullscreen.bs index 9c2d079..2d77c61 100644 --- a/fullscreen.bs +++ b/fullscreen.bs @@ -61,8 +61,16 @@ stated otherwise it is unset.

All documents have an associated list of pending fullscreen events, which is an ordered set of (string, element) tuples. It is initially empty. -

To fullscreen an element, set element's fullscreen flag -and add it to its node document's top layer. +

To fullscreen an element: + +

    +
  1. Run hide all popovers given element's node document. + +

  2. Set element's fullscreen flag. + +

  3. Add element to element's node document's + top layer. +

To unfullscreen an element, unset element's fullscreen flag and iframe fullscreen flag (if any), and remove it from @@ -230,6 +238,10 @@ if all of the following are true, and false otherwise:

  • element's node document is allowed to use the "fullscreen" feature. + +

  • element namespace is not the HTML namespace or + element's popover visibility state is hidden.