-
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 notes for focus & non-"fully active" documents #6696
Conversation
Fixes whatwg#5878. Clarifies that the focused element stays the same/not reset when a document's "full active" state changed, and no events (focus/blur) are fired
<p class="note">The <span>fully active</span> state does not affect wheter 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> |
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.
I wonder what the viewport is for non-fully active documents... probably it stays the same? Otherwise a bunch of IntersectionObservers would fire whenever you enter bfcache.
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.
Ah, interesting. I read https://drafts.csswg.org/css2/#viewport a little bit, it doesn't really say much about the interaction with the document, but I think it should stay the same. Should we add a note here too?
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.
Yeah, I think something here would be good. I was thinking of maybe a note here plus a normative update to CSS2, but CSS2 is so environment-agnostic that maybe it makes sense to put something normative here instead, since HTML kind of "owns" the notion of what a viewport means for web browsers?
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.
OK, added a note, PTAL :)
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.
Nice!
LGTM! Just waiting on bugs and tests then. |
Any update on tests and bugs? /cc @hiroshige-g |
This CL adds a test to confirm that, when page gets into and out of BFCache, - Focus should be kept and - blur/focus events are not fired. The current results are Safari: Pass Firefox: Focus remains the same but blur/focus events are fired. Chrome: Focus is lost. See whatwg/html#6696 for other status and implementation bug links etc. Bug: 1107415, 1253728, whatwg/html#5878 Change-Id: I2bb9a420de19f24d7010917f7e6ce54cba8212fb
This CL adds a test to confirm that, when page gets into and out of BFCache, - Focus should be kept and - blur/focus events are not fired. The current results are Safari: Pass Firefox: Focus remains the same but blur/focus events are fired. Chrome: Focus is lost. See whatwg/html#6696 for other status and implementation bug links etc. Bug: 1107415, 1253728, whatwg/html#5878 Change-Id: I2bb9a420de19f24d7010917f7e6ce54cba8212fb
This CL adds a test to confirm that, when page gets into and out of BFCache, - Focus should be kept and - blur/focus events are not fired. The current results are Safari: Pass Firefox: Focus remains the same but blur/focus events are fired. Chrome: Focus is lost. See whatwg/html#6696 for other status and implementation bug links etc. Bug: 1107415, 1253728, whatwg/html#5878 Change-Id: I2bb9a420de19f24d7010917f7e6ce54cba8212fb
This CL adds a test to confirm that, when page gets into and out of BFCache, - Focus should be kept and - blur/focus events are not fired. The current results are Safari: Pass Firefox: Focus remains the same but blur/focus events are fired. Chrome: Focus is lost. See whatwg/html#6696 for other status and implementation bug links etc. Bug: 1107415, 1253728, whatwg/html#5878 Change-Id: I2bb9a420de19f24d7010917f7e6ce54cba8212fb
This CL adds a test to confirm that, when page gets into and out of BFCache, - Focus should be kept and - blur/focus events are not fired. The current results are Safari: Pass Firefox: Focus remains the same but blur/focus events are fired. Chrome: Focus is lost. See whatwg/html#6696 for other status and implementation bug links etc. Bug: 1107415, 1253728, whatwg/html#5878 Change-Id: I2bb9a420de19f24d7010917f7e6ce54cba8212fb
This CL adds a test to confirm that, when page gets into and out of BFCache, - Focus should be kept and - blur/focus events are not fired. The current results are Safari: Pass Firefox: Focus remains the same but blur/focus events are fired. Chrome: Focus is lost. See whatwg/html#6696 for other status and implementation bug links etc. Bug: 1107415, 1253728, whatwg/html#5878 Change-Id: I2bb9a420de19f24d7010917f7e6ce54cba8212fb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3198456 Reviewed-by: Rakina Zata Amni <rakina@chromium.org> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Cr-Commit-Position: refs/heads/main@{#968703}
This CL adds a test to confirm that, when page gets into and out of BFCache, - Focus should be kept and - blur/focus events are not fired. The current results are Safari: Pass Firefox: Focus remains the same but blur/focus events are fired. Chrome: Focus is lost. See whatwg/html#6696 for other status and implementation bug links etc. Bug: 1107415, 1253728, whatwg/html#5878 Change-Id: I2bb9a420de19f24d7010917f7e6ce54cba8212fb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3198456 Reviewed-by: Rakina Zata Amni <rakina@chromium.org> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Cr-Commit-Position: refs/heads/main@{#968703}
This CL adds a test to confirm that, when page gets into and out of BFCache, - Focus should be kept and - blur/focus events are not fired. The current results are Safari: Pass Firefox: Focus remains the same but blur/focus events are fired. Chrome: Focus is lost. See whatwg/html#6696 for other status and implementation bug links etc. Bug: 1107415, 1253728, whatwg/html#5878 Change-Id: I2bb9a420de19f24d7010917f7e6ce54cba8212fb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3198456 Reviewed-by: Rakina Zata Amni <rakina@chromium.org> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Cr-Commit-Position: refs/heads/main@{#968703}
This CL adds a test to confirm that, when page gets into and out of BFCache, - Focus should be kept and - blur/focus events are not fired. The current results are Safari: Pass Firefox: Focus remains the same but blur/focus events are fired. Chrome: Focus is lost. See whatwg/html#6696 for other status and implementation bug links etc. Bug: 1107415, 1253728, whatwg/html#5878 Change-Id: I2bb9a420de19f24d7010917f7e6ce54cba8212fb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3198456 Reviewed-by: Rakina Zata Amni <rakina@chromium.org> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Cr-Commit-Position: refs/heads/main@{#968703}
…nd BFCache, a=testonly Automatic update from web-platform-tests [WPT] BFCache: focus should be kept around BFCache This CL adds a test to confirm that, when page gets into and out of BFCache, - Focus should be kept and - blur/focus events are not fired. The current results are Safari: Pass Firefox: Focus remains the same but blur/focus events are fired. Chrome: Focus is lost. See whatwg/html#6696 for other status and implementation bug links etc. Bug: 1107415, 1253728, whatwg/html#5878 Change-Id: I2bb9a420de19f24d7010917f7e6ce54cba8212fb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3198456 Reviewed-by: Rakina Zata Amni <rakina@chromium.org> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Cr-Commit-Position: refs/heads/main@{#968703} -- wpt-commits: a1e49a05bf46345316fd04bb4b22e5e7e8d9bc70 wpt-pr: 31084
This CL adds a test to confirm that, when page gets into and out of BFCache, - Focus should be kept and - blur/focus events are not fired. The current results are Safari: Pass Firefox: Focus remains the same but blur/focus events are fired. Chrome: Focus is lost. See whatwg/html#6696 for other status and implementation bug links etc. Bug: 1107415, 1253728, whatwg/html#5878 Change-Id: I2bb9a420de19f24d7010917f7e6ce54cba8212fb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3198456 Reviewed-by: Rakina Zata Amni <rakina@chromium.org> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Cr-Commit-Position: refs/heads/main@{#968703}
…nd BFCache, a=testonly Automatic update from web-platform-tests [WPT] BFCache: focus should be kept around BFCache This CL adds a test to confirm that, when page gets into and out of BFCache, - Focus should be kept and - blur/focus events are not fired. The current results are Safari: Pass Firefox: Focus remains the same but blur/focus events are fired. Chrome: Focus is lost. See whatwg/html#6696 for other status and implementation bug links etc. Bug: 1107415, 1253728, whatwg/html#5878 Change-Id: I2bb9a420de19f24d7010917f7e6ce54cba8212fb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3198456 Reviewed-by: Rakina Zata Amni <rakina@chromium.org> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Cr-Commit-Position: refs/heads/main@{#968703} -- wpt-commits: a1e49a05bf46345316fd04bb4b22e5e7e8d9bc70 wpt-pr: 31084
…nd BFCache, a=testonly Automatic update from web-platform-tests [WPT] BFCache: focus should be kept around BFCache This CL adds a test to confirm that, when page gets into and out of BFCache, - Focus should be kept and - blur/focus events are not fired. The current results are Safari: Pass Firefox: Focus remains the same but blur/focus events are fired. Chrome: Focus is lost. See whatwg/html#6696 for other status and implementation bug links etc. Bug: 1107415, 1253728, whatwg/html#5878 Change-Id: I2bb9a420de19f24d7010917f7e6ce54cba8212fb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3198456 Reviewed-by: Rakina Zata Amni <rakina@chromium.org> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Cr-Commit-Position: refs/heads/main@{#968703} -- wpt-commits: a1e49a05bf46345316fd04bb4b22e5e7e8d9bc70 wpt-pr: 31084
…nd BFCache, a=testonly Automatic update from web-platform-tests [WPT] BFCache: focus should be kept around BFCache This CL adds a test to confirm that, when page gets into and out of BFCache, - Focus should be kept and - blur/focus events are not fired. The current results are Safari: Pass Firefox: Focus remains the same but blur/focus events are fired. Chrome: Focus is lost. See whatwg/html#6696 for other status and implementation bug links etc. Bug: 1107415, 1253728, whatwg/html#5878 Change-Id: I2bb9a420de19f24d7010917f7e6ce54cba8212fb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3198456 Reviewed-by: Rakina Zata Amni <rakina@chromium.org> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Cr-Commit-Position: refs/heads/main@{#968703} -- wpt-commits: a1e49a05bf46345316fd04bb4b22e5e7e8d9bc70 wpt-pr: 31084
This CL adds a test to confirm that, when page gets into and out of BFCache, - Focus should be kept and - blur/focus events are not fired. The current results are Safari: Pass Firefox: Focus remains the same but blur/focus events are fired. Chrome: Focus is lost. See whatwg/html#6696 for other status and implementation bug links etc. Bug: 1107415, 1253728, whatwg/html#5878 Change-Id: I2bb9a420de19f24d7010917f7e6ce54cba8212fb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3198456 Reviewed-by: Rakina Zata Amni <rakina@chromium.org> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Cr-Commit-Position: refs/heads/main@{#968703} NOKEYCHECK=True GitOrigin-RevId: 60349a6da0ccfa946936e76665ccff67fc9eac22
Fixes #5878. Clarifies that the focused element stays the same/not reset when a document's "full active" state changed, and no events (focus/blur) are fired, as suggested by @domenic in #5878 (comment).
(See WHATWG Working Mode: Changes for more details.)
/interaction.html ( diff )
/rendering.html ( diff )