Bug 276864 - Escape fails to close popover or dialog if focus is on a search input
Summary: Escape fails to close popover or dialog if focus is on a search input
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Safari 17
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-07-21 10:48 PDT by Luke Warlow
Modified: 2024-08-20 11:38 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Warlow 2024-07-21 10:48:02 PDT
As can be seen both here https://jsfiddle.net/7wsghcn0/ (dialog) and https://jsfiddle.net/L4traqh8/ (popover), if you press open and then try to close the top-layer element using the escape key, it fails because focus is inside of a search input.

Safari: Fails to close

Firefox: Closes

Chrome: Closes
Comment 1 Micah Cambre 2024-07-25 20:49:32 PDT
Adding to Luke's bug here, my testing shows that this is not limited to search input, but any input type as well as textarea. It might be a general form field focus issue inside of a popover.
Comment 2 Radar WebKit Bug Importer 2024-07-28 10:48:17 PDT
<rdar://problem/132678928>
Comment 3 Tim Nguyen (:ntim) 2024-08-20 11:38:41 PDT
Relevant code is here if you'd like to take a look:

https://searchfox.org/wubkat/rev/b36cbce69fddb7da33823f316bd8ead5bebee970/Source/WebCore/page/EventHandler.cpp#4075-4083