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

Error when used within a directive with custom elements name #16

Open
jejay opened this issue Jun 30, 2016 · 2 comments
Open

Error when used within a directive with custom elements name #16

jejay opened this issue Jun 30, 2016 · 2 comments
Labels

Comments

@jejay
Copy link

jejay commented Jun 30, 2016

When the slider is used within a directive with custom element, for example the https://github.com/LukaszWatroba/v-tabs, the following error is thrown:

TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'

The corresponding code is:

<v-tabs>
  <v-tab>Tab 1</v-tab>
  <v-tab>Tab 2</v-tab>
</v-tabs>

<v-pages>
  <v-page>
     <circular-slider ... />
  </v-page>
  <v-page>
       ...
  </v-page>
</v-pages>

A temporary solution is to use divs as fallback:

<v-tabs>
  <v-tab>Tab 1</v-tab>
  <v-tab>Tab 2</v-tab>
</v-tabs>

<div v-pages>
  <div v-page>
     <circular-slider ... />
  </div>
  <div v-page>
       ...
  </div>
</div>

This does work as expected.

@jejay
Copy link
Author

jejay commented Jun 30, 2016

It should be said that the v-tabs directive is not working anymore correctly with the div fallback. This is mainly a css issue. For reproducing the working "fallback" you should leave <v-tabs> as it is and only change <v-page(s)> to <div vpage(s)> and also the css accordingly.

I used the chrome 51.

@jejay
Copy link
Author

jejay commented Jun 30, 2016

Sry for the inconvenieunce, but I found out the issue is a css related issue.. The problem does not lie in the elements custom name but rahter in some css that the v-tabs-directive contains.

All what is needed to reproduce the error is:

<div style="display:none">
    <circular-slider
        class='my-slider'
        animate='true'
        on-slide='onSlide'
        on-slide-end='onSlideEnd'
        min="0"
        max="360"
        value="subject.selected.rotation">
    </circular-slider>
</div>

princejwesley added a commit that referenced this issue Jul 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants