Skip to content

Commit

Permalink
Add notes for focus, etc. and non-fully active documents
Browse files Browse the repository at this point in the history
Fixes whatwg#5878. Clarifies that the focused element stays the same and is not reset when a document's fully active state is changed, and no events (focus/blur) are fired. Also clarifies that fully active does not impact "being rendered" or viewport intersection.
  • Loading branch information
rakina authored and dandclark committed Dec 4, 2021
1 parent 4397813 commit c770876
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -74812,6 +74812,10 @@ END:VCARD</pre>
area of the document</dfn>. Which control is so designated changes over time, based on algorithms
in this specification.</p>

<p class="note">Even if a document is not <span>fully active</span> and not shown to the user, it
can still have a <span>focused area of the document</span>. If a document's <span>fully
active</span> state changes, its <span>focused area of the document</span> will stay the same.</p>

<p>The <dfn>currently focused area of a top-level browsing context</dfn> <var>topLevelBC</var> at
any particular time is the <span>focusable area</span>-or-null returned by this algorithm:</p>

Expand Down Expand Up @@ -116105,9 +116109,19 @@ console.assert(container.firstChild instanceof SuperP);
means the element is not <span>being rendered</span>, though this might be overridden by the style
sheets.</p>

<p class="note">The <span>fully active</span> state does not affect whether an element is
<span>being rendered</span> or not. Even if a document is not <span>fully active</span> and not
shown at all to the user, elements within it can still qualify as "being rendered".</p>

<p>An element is said to <dfn>intersect the viewport</dfn> when it is <span>being rendered</span>
and its associated CSS layout box intersects the <span>viewport</span>.</p>

<p class="note">Similar to the <span>being rendered</span> state, elements in non-<span>fully
active</span> documents can still <span>intersect the viewport</span>. The <span>viewport</span>
is not shared between documents and might not always be shown to the user, so an element in a
non-<span>fully active</span> document can still intersect the <span>viewport</span> associated
with its document.</p>

<p class="note">This specification does not define the precise timing for when the intersection is
tested, but it is suggested that the timing match that of the Intersection Observer API. <ref
spec=INTERSECTIONOBSERVER></p>
Expand Down

0 comments on commit c770876

Please sign in to comment.