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

Script error in IE8 when trying to navigate past the first or last tab using arrow keys #1490

Closed
36degrees opened this issue Jul 12, 2019 · 1 comment · Fixed by #1678
Closed
Labels
🐛 bug Something isn't working the way it should (including incorrect wording in documentation)

Comments

@36degrees
Copy link
Contributor

Steps to reproduce:

  1. Open the tabs component in Internet Explorer 8
  2. Either:
  • focus the first tab and press the left arrow key; or
  • focus the last tab and press the right arrow key

Expected result:

Nothing should happen, as you are already focused on the first / last tab.

Actual result:

A JavaScript error is thrown. This appears (?) to be a problem with the previousElementSibling polyfill used for IE8.

Screenshot 2019-07-12 at 09 33 08BST

@36degrees 36degrees added the 🐛 bug Something isn't working the way it should (including incorrect wording in documentation) label Jul 12, 2019
@36degrees
Copy link
Contributor Author

This isn't a major bug – the tabs continue to work, and unless the user has script debugging enabled then I think all they'll see is a 'Errors on page' message in the status bar.

However, we could consider this another reason to falling back to the non-JS experience for browsers that don't support previousElementSibling (IE8, Chrome < 4, Firefox < 3.5, Safari < 4, Opera < 10).

NickColley added a commit that referenced this issue Dec 11, 2019
In Internet Explorer 8 errors are thrown when checking the nodeType as nextSibiling is undefined, so to fix this issue we should first check if there is a next sibiling which matches the conditional in the while loop.

Fixes #1490
NickColley added a commit that referenced this issue Dec 11, 2019
In Internet Explorer 8 errors are thrown when checking the nodeType as nextSibiling is undefined, so to fix this issue we should first check if there is a next sibiling which matches the conditional in the while loop.

Fixes #1490
NickColley added a commit that referenced this issue Dec 18, 2019
In Internet Explorer 8 errors are thrown when checking the nodeType as nextSibiling is undefined, so to fix this issue we should first check if there is a next sibiling which matches the conditional in the while loop.

Fixes #1490
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working the way it should (including incorrect wording in documentation)
Projects
Development

Successfully merging a pull request may close this issue.

1 participant