Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a dialog focus test that expects a wrong element to be focused #23485

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
outerButton = document.getElementById('outer-button');
assert_equals(document.activeElement, outerButton);

// Test that focus goes to body if the dialog has no focusable elements, including itself
// dialog element itself should be focused when no descendant
// element matches the requirements.
var outerDialog = document.getElementById('outer-dialog');
outerDialog.showModal();
assert_equals(document.activeElement, document.body);
assert_equals(document.activeElement, outerDialog);

// Test that an autofocus element in the dialog gets focus.
var dialog = document.getElementById('dialog');
Expand Down