Skip to content

Commit 087a967

Browse files
committed
fix: Regex to check key in handleKeydown method to support IE11
1 parent eea2647 commit 087a967

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/VueSkipToList.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default {
5050
methods: {
5151
handleKeydown ({ key, target }) {
5252
const parent = target.parentElement
53-
const itemList = key === 'ArrowUp' ? parent.previousElementSibling : parent.nextElementSibling
53+
const itemList = /(ArrowUp|Up)/g.test(key) ? parent.previousElementSibling : parent.nextElementSibling
5454
5555
if (!itemList) return
5656

0 commit comments

Comments
 (0)