Vue-slider-component: Problem when component is initiated with display: none

Created on 13 Feb 2017  路  4Comments  路  Source: NightCatSama/vue-slider-component

Hi, first of all thank you for the nice slider component :).

There is a problem when the slider is initiated with display:none, as shown in the attached image. When the slider appears it cannot be interacted.

I found a quick fix, when the window is resized the component works again, so I have to manually call window.dispatchEvent(new Event('resize'))

slider issue

Most helpful comment

Thank you for your support.

All 4 comments

Yes, there is such a problem. I have that solution at the bottom of the document.

Oh, sorry, didn't saw that.
I will use this.$refs.slider.refresh() instead of indow.dispatchEvent(new Event('resize')).

Thank you for your support.

I can't access the ref of my vue-slider. Is there another way to use the refesh() ?

In the meantime I'm going to use the window.dispatchEvent(new Event('resize')).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

akinhwan picture akinhwan  路  3Comments

exodusanto picture exodusanto  路  6Comments

callumacrae picture callumacrae  路  3Comments

creativejeff picture creativejeff  路  7Comments

bogdan1190 picture bogdan1190  路  5Comments