You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've found that if you attach an event listener to an element with a v-if attribute then it doesn't work. However if you remove the attribute it works fine.
I have produced an example which illustrates the problem:
If you click the button it doesn't show anything in the console. However if you remove the v-if attribute against the button and then click it, it works as exected.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've found that if you attach an event listener to an element with a
v-if
attribute then it doesn't work. However if you remove the attribute it works fine.I have produced an example which illustrates the problem:
https://jsfiddle.net/3g7oqcak/
If you click the button it doesn't show anything in the console. However if you remove the
v-if
attribute against the button and then click it, it works as exected.Beta Was this translation helpful? Give feedback.
All reactions