mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-07 18:04:46 +00:00
Bug 1841270 - refine focus handling in HidePopover. r=emilio
Only run focusing steps for previouslyFocusedElement if focus is within the popover hierarchy. Differential Revision: https://phabricator.services.mozilla.com/D186439
This commit is contained in:
parent
5f21e273ca
commit
e4af459857
@ -3447,10 +3447,13 @@ void nsGenericHTMLElement::FocusPreviousElementAfterHidingPopover() {
|
||||
return;
|
||||
}
|
||||
|
||||
// Run the focusing steps for previouslyFocusedElement
|
||||
FocusOptions options;
|
||||
options.mPreventScroll = true;
|
||||
control->Focus(options, CallerType::NonSystem, IgnoreErrors());
|
||||
// Run the focusing steps for previouslyFocusedElement if focus is within the
|
||||
// popover hierarchy.
|
||||
if (IsShadowIncludingInclusiveDescendantOf(control)) {
|
||||
FocusOptions options;
|
||||
options.mPreventScroll = true;
|
||||
control->Focus(options, CallerType::NonSystem, IgnoreErrors());
|
||||
}
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/popover.html#dom-togglepopover
|
||||
|
@ -11,77 +11,50 @@
|
||||
[Popover button click focus test: autofocus popover]
|
||||
expected: FAIL
|
||||
|
||||
[Popover corner cases test: autofocus popover]
|
||||
expected: FAIL
|
||||
|
||||
[Popover focus test: autofocus empty popover]
|
||||
expected: FAIL
|
||||
|
||||
[Popover button click focus test: autofocus empty popover]
|
||||
expected: FAIL
|
||||
|
||||
[Popover corner cases test: autofocus empty popover]
|
||||
expected: FAIL
|
||||
|
||||
[Popover focus test: autofocus popover with button]
|
||||
expected: FAIL
|
||||
|
||||
[Popover button click focus test: autofocus popover with button]
|
||||
expected: FAIL
|
||||
|
||||
[Popover corner cases test: autofocus popover with button]
|
||||
expected: FAIL
|
||||
|
||||
[Popover focus test: autofocus child]
|
||||
expected: FAIL
|
||||
|
||||
[Popover button click focus test: autofocus child]
|
||||
expected: FAIL
|
||||
|
||||
[Popover corner cases test: autofocus child]
|
||||
expected: FAIL
|
||||
|
||||
[Popover focus test: autofocus on tabindex=0 element]
|
||||
expected: FAIL
|
||||
|
||||
[Popover button click focus test: autofocus on tabindex=0 element]
|
||||
expected: FAIL
|
||||
|
||||
[Popover corner cases test: autofocus on tabindex=0 element]
|
||||
expected: FAIL
|
||||
|
||||
[Popover focus test: autofocus multiple children]
|
||||
expected: FAIL
|
||||
|
||||
[Popover button click focus test: autofocus multiple children]
|
||||
expected: FAIL
|
||||
|
||||
[Popover corner cases test: autofocus multiple children]
|
||||
expected: FAIL
|
||||
|
||||
[Popover focus test: autofocus popover and multiple autofocus children]
|
||||
expected: FAIL
|
||||
|
||||
[Popover button click focus test: autofocus popover and multiple autofocus children]
|
||||
expected: FAIL
|
||||
|
||||
[Popover corner cases test: autofocus popover and multiple autofocus children]
|
||||
expected: FAIL
|
||||
|
||||
[Popover focus test: Opening dialogs as popovers should use dialog initial focus algorithm.]
|
||||
expected: FAIL
|
||||
|
||||
[Popover button click focus test: Opening dialogs as popovers should use dialog initial focus algorithm.]
|
||||
expected: FAIL
|
||||
|
||||
[Popover corner cases test: Opening dialogs as popovers should use dialog initial focus algorithm.]
|
||||
expected: FAIL
|
||||
|
||||
[Popover focus test: Opening dialogs as popovers which have autofocus should focus the dialog.]
|
||||
expected: FAIL
|
||||
|
||||
[Popover button click focus test: Opening dialogs as popovers which have autofocus should focus the dialog.]
|
||||
expected: FAIL
|
||||
|
||||
[Popover corner cases test: Opening dialogs as popovers which have autofocus should focus the dialog.]
|
||||
expected: FAIL
|
||||
|
Loading…
Reference in New Issue
Block a user