maoberlehner / vue-lazy-hydration

Lazy Hydration of Server-Side Rendered Vue.js Components
MIT License
1.18k stars 52 forks source link

Using `on-interaction` first click is not registered #40

Closed simplenotezy closed 4 years ago

simplenotezy commented 4 years ago

When using on-interaction the first click is not registered, so only the second click works. Using mouseover could prevent this.

maoberlehner commented 4 years ago

This is the expected behaviour. Because the component is not hydrated initially, the there is no click event listener registered on the component. Only after the the component is hydrated, it does listen for the click event.

If you need your component to listen for click events, you can't use on-interaction.