Bug 252441 - Always store user-exposed elements as dialog & popover previously focused elements
Summary: Always store user-exposed elements as dialog & popover previously focused ele...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-02-16 15:39 PST by Tim Nguyen (:ntim)
Modified: 2023-08-21 15:51 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Nguyen (:ntim) 2023-02-16 15:39:44 PST
Webkit sometimes store the UA shadow DOM of <input> element as previously focused elements, which fails focus restoration if input changes type.

There should be a common method to get the "exposed" focused element, and it should be used to store the previously focused element.

It should also be used here as well (in FrameView.cpp): https://github.com/WebKit/WebKit/commit/a728674047d7d348157d6e313ddcb9d9662c48c5 (the issue was that the code was trying to get the scroll margin of the UA shadow DOM instead of the input itself)
Comment 1 Radar WebKit Bug Importer 2023-02-23 15:40:16 PST
<rdar://problem/105855994>