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: Off by one error in next/previous tab #15

Merged
merged 3 commits into from
Dec 20, 2019

Conversation

NicholasBoll
Copy link
Contributor

@NicholasBoll NicholasBoll commented Dec 16, 2019

This change fixes the edge cases when using shift-tab when on the first focusable element and the edge case when using tab when on the last focusable element. The error was "Cannot call select of undefined"

@@ -23,4 +23,7 @@
"autoFix": true
},
],
"editor.codeActionsOnSave": {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The ESLint plugin insisted on this change (added every time I removed it).

Copy link
Owner

Choose a reason for hiding this comment

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

interesting, I will keep it then


return seq[nextIndex]
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

lint rules prevented an else here

@@ -1,4 +1,5 @@
/// <reference types="cypress"/>
/* global cy */
Copy link
Contributor Author

Choose a reason for hiding this comment

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

lint-staged forced me to add this.

src/index.js Outdated
@@ -1,3 +1,4 @@
/* global Cypress, cy */
Copy link
Contributor Author

Choose a reason for hiding this comment

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

lint-staged forced me to add this

Copy link
Owner

Choose a reason for hiding this comment

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

are you sure you are using local install of eslint? the cypress plugin should have these globals set

@kuceb
Copy link
Owner

kuceb commented Dec 18, 2019

looks good. I'm going to remove the eslint related changes since I think it's caused by either the cypress plugin not being installed or using global eslint 👍

@kuceb kuceb merged commit 5ac8b01 into kuceb:master Dec 20, 2019
@kuceb
Copy link
Owner

kuceb commented Dec 20, 2019

🎉 This PR is included in version 1.0.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@kuceb kuceb added the released label Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nextItemFromIndex suffers off-by-one errors
2 participants