Trying to navigate through div elements using arrow keys is proving to be a challenge for me. I have successfully achieved it in JavaScript, but I am facing difficulties doing it the "vue way". Although there should be no differences, it simply does not work.
I have created a sandbox for anyone to analyze what is happening. It works fine when I am not using Vue.
When attempting to implement this in Vue, I encounter the following error due to this line:
Cannot read property 'focus' of null
document.activeElement.parentNode.previousSibling.firstChild.focus();
Could someone please point out what I am missing? Is the v-for
causing the issue, or are there other underlying problems?