Bug 184422

Summary: focus-within and display: none ignoring tabbing and clicking
Product: WebKit Reporter: ataylor32
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: caugner, rniwa, simon.fraser, wenson_hsieh
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Mac   
OS: Unspecified   
Attachments:
Description Flags
Demo none

ataylor32
Reported 2018-04-09 11:31:58 PDT
Created attachment 337514 [details] Demo I have a <div> with a child <input>. That <input> has a sibling <ul> that should be visible only if the <div> has focus within it. That part works, but if I try to interact with the items within the <ul> (by tabbing to them or clicking on them), I am unable to. Here is a live demo: https://jsfiddle.net/50xs6514/ I have also attached a file demonstrating the problem.
Attachments
Demo (954 bytes, text/html)
2018-04-09 11:31 PDT, ataylor32
no flags
caugner
Comment 1 2025-03-18 06:24:10 PDT
It looks like a workaround is to check for `:focus` in addition to `:focus-within`, see: https://jsfiddle.net/7Lfwhsv5/1/ See also: https://bugs.webkit.org/show_bug.cgi?id=286856
Note You need to log in before you can comment on or make changes to this bug.