Skip to content

Deal with element parents not being present #12

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

simonhype
Copy link

When fetching the siblings of an element, the parent node might not be present yet. This can happen when the v-roving-tabindex-container directive and the v-roving-tabindex directive are used in separate components and the siblings of the v-roving-tabindex elements are fetched during mounting. It leads to an error when then trying to get the children of that non-existing parent.

This case is handled in this commit by just not returning any siblings. As a result, the tabindex is not set correctly on the elements at first. But this seems to fix itself later on when attempting to set the tabindex again in the update lifecycle method.

When fetching the siblings of an element, the parent node might not be present yet. This can happen when the v-roving-tabindex-container directive and the v-roving-tabindex directive are used in separate components and the siblings of the v-roving-tabindex elements are fetched during mounting.
It leads to an error when then trying to get the children of that non-existing parent.

This case is handled in this commit by just not returning any siblings. As a result, the tabindex is not set correctly on the elements at first. But this seems to fix itself later on when attempting to set the tabindex again in the update lifecycle method.
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.

1 participant