Skip to content
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

CollapsibleHeader does not work with whitespace between v-collapsible-header and v-collapsible-body #17

Closed
SiggyF opened this issue Dec 20, 2016 · 1 comment
Assignees
Labels
T: bug Functionality that does not work as intended/expected

Comments

@SiggyF
Copy link

SiggyF commented Dec 20, 2016

When there is whitespace between the v-collapsible-header and v-collapsible-body the click event on the v-collapsible-header results in the error:

Uncaught TypeError: this.$el.nextSibling.getAttribute is not a function

This error occurs with the following example:

<v-collapsible>
  <v-collapsible-header>Item</v-collapsible-header>
  <v-collapsible-body>
    <v-card>
      <v-card-text class="grey lighten-3">...</v-card-text>
    </v-card>
  </v-collapsible-body>
</v-collapsible>

The problem is that the nextSibling call in CollapsibleHeader.vue returns a #text node instead of the intended v-collapsible-body element.

Possible solutions include using nextElementSibling (with limited browser support) or the .next() function from jquery. A workaround is to collapse the whitespace in the html.

I had this issue using Vue 2.1.6 and vuetify@51945ce6bfb8c20c478cdd8c705af1a5da18d85b

@johnleider johnleider added the T: bug Functionality that does not work as intended/expected label Dec 20, 2016
@johnleider johnleider self-assigned this Dec 20, 2016
KaelWD pushed a commit that referenced this issue Oct 28, 2018
@lock
Copy link

lock bot commented Apr 17, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please direct any non-bug questions to our Discord

@lock lock bot locked as resolved and limited conversation to collaborators Apr 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T: bug Functionality that does not work as intended/expected
2 participants