Skip to content

Duplicate id:s in showHide components can cause them to be missing in the registry in nuxt after navigation #2897

@sebbayer

Description

@sebbayer

Describe the bug

I have a nuxt environment with a v-b-toggle.collapse-1 directive on one element controlling a BCollapse with that id="collapse-1" assigned. After a route change to a different page with the same components on it, the toggle button is not working anymore. See reproduction link. I also get the warning

[v-b-toggle] Target with ID collapse-1 not found

although the element with that ID is on the page. This problem was introduced since 0.29.0 for me and exists in latest version 0.40.7 for me as well.

Reproduction

https://stackblitz.com/edit/nuxt-starter-znycgcxc?file=app%2Fapp.vue,app%2Fpages%2Findex.vue,app%2Fpages%2Fother.vue

Used Package Manager

npm

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions