Skip to content

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