Skip to content

fix: anchor element focus order on form submission reversed compared to Chrome #24

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

Merged
merged 1 commit into from
Feb 23, 2021

Conversation

lideen
Copy link
Contributor

@lideen lideen commented Feb 22, 2021

I noticed that the focus order was in reverse compared to Chrome when submitting forms with invalid inputs. This PR corrects that issue.

@@ -102,6 +102,7 @@ export const formSubmitCallback = (event: Event) => {
const nodes = Array.from(elements);
/** Check the internals.checkValidity() of all nodes */
const validityList = nodes
.reverse()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😐

Copy link
Owner

@calebdwilliams calebdwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@calebdwilliams calebdwilliams merged commit 8346b2f into calebdwilliams:master Feb 23, 2021
@calebdwilliams
Copy link
Owner

Released in 0.1.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants