[Webkit-unassigned] [Bug 251425] New: Unexpected focus-within behaviour when layout is forced during blur event
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jan 31 01:31:23 PST 2023
https://bugs.webkit.org/show_bug.cgi?id=251425
Bug ID: 251425
Summary: Unexpected focus-within behaviour when layout is
forced during blur event
Product: WebKit
Version: Safari Technology Preview
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Layout and Rendering
Assignee: webkit-unassigned at lists.webkit.org
Reporter: bastien.caudan at gmail.com
CC: bfulgham at webkit.org, simon.fraser at apple.com,
zalan at apple.com
On a case where an element visibility is conditioned by a :focus-within pseudo class:
<style>
.dropdown .dropdown-content {
visibility: hidden;
}
.dropdown:focus-within .dropdown-content {
visibility: visible;
}
</style>
<div class="dropdown">
<label tabindex="0">Click</label>
<ul tabindex="0" class="dropdown-content">
<li><a href="#foo">Go to foo</a></li>
<li><a href="#bar">Go to bar</a></li>
</ul>
</div>
When switching the focus to an inner element (clicking on one of the links) with a forced layout during the blur event, the inner element is not focused.
Without the forced layout on the blur event it behaves as expected.
I have setup a reproduction case here: https://codesandbox.io/s/stupefied-andras-p79o0x?file=/index.html
Other browsers seem to handle this case without issue.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230131/c17c61e6/attachment.htm>
More information about the webkit-unassigned
mailing list