Bug 112968 - FKA: mouse click on buttons causes focus (document.activeElement) to be lost
Summary: FKA: mouse click on buttons causes focus (document.activeElement) to be lost
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2013-03-21 14:44 PDT by James Craig
Modified: 2022-04-06 00:36 PDT (History)
6 users (show)

See Also:

test case demonstrating bug (274 bytes, text/html)
2013-03-21 14:47 PDT, James Craig
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Craig 2013-03-21 14:44:22 PDT
1. Load attached test case.
2. Tab so that focus is on one of the buttons.
3. Perform a mouse click on the same button. (Notice focus ring disappears.)
4. Press Tab again. (focus has been lost and resets to the beginning of the document)

Note: It's probably okay to "hide" the focus pseudo-state when switching to a mouse, but Tabbing should cause focus to come back to the same element rather than losing document.activeElement entirely.
Comment 1 James Craig 2013-03-21 14:47:19 PDT
Created attachment 194349 [details]
test case demonstrating bug
Comment 2 Radar WebKit Bug Importer 2013-03-21 14:48:14 PDT
Comment 3 James Craig 2013-03-21 14:48:42 PDT
See expected behavior in Firefox 19 for Mac.
Comment 4 Radar WebKit Bug Importer 2013-03-21 14:49:02 PDT
Comment 5 Alexey Proskuryakov 2013-03-22 15:51:21 PDT
See also: bug 22261.
Comment 6 James Craig 2015-03-11 23:20:37 PDT
Comment 7 Mu-An Chiou 2018-08-09 11:26:44 PDT
Any updates on this? I see that there's not been any changes since the bug was reported 5 years ago. This issue makes building custom widget with focus management very tricky.
Comment 8 James Craig 2021-06-14 12:08:19 PDT
Relating to the newer :focus-visible tracker in bug 225148
Comment 9 Manuel Rego Casasnovas 2022-04-06 00:36:16 PDT
Very related bug, see bug #229895.