Bug 1617600 - Prototype :focus-visible behind a flag. r=smaug
The heuristic is that we show focus outlines for unknown or key focus, and not for mouse / touch. This is probably not the final heuristic we take, but this allows people to play with it and file bugs. Once this is mature enough we should remove :-moz-focusring in favor of :focus-visible. Differential Revision: https://phabricator.services.mozilla.com/D63861
This commit is contained in:
@@ -2172,7 +2172,8 @@ void HTMLInputElement::SetFocusState(bool aIsFocused) {
|
||||
return;
|
||||
}
|
||||
|
||||
EventStates focusStates = NS_EVENT_STATE_FOCUS | NS_EVENT_STATE_FOCUSRING;
|
||||
EventStates focusStates = NS_EVENT_STATE_FOCUS | NS_EVENT_STATE_FOCUSRING |
|
||||
NS_EVENT_STATE_FOCUS_VISIBLE;
|
||||
if (aIsFocused) {
|
||||
AddStates(focusStates);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user