question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

<v-btn> v-on:click doesn't work

See original GitHub issue

Trying to set a method on a v-btn for the click event, but it doesn’t fire.

I’ve tried using both v-on:click and @click, and both don’t work.

Here’s a snippet:

v-btn(flat block right  class="darken-1" v-on:click="console.log('foo')") Login

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

30reactions
johnleidercommented, Dec 26, 2016

You must call click .native. Implicit events only work on components with that modifier.

https://vuejs.org/v2/guide/migration.html#Listening-for-Native-Events-on-Components-with-v-on-changed

12reactions
garyocommented, Mar 26, 2019

It would perhaps be good for the Vuetify docs to mention what events are emitted by each component (@click, @click.native, @input, etc.). It’s hard for a user to know which ones to listen for.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Javascript "onClick" event doesn't work - Stack Overflow
The button is displayed but when it is clicked, nothing happens. The function is located in an external JS file. this is function...
Read more >
onclick function() doesn't work... - Sololearn
in the html i code: Hello A in the js page, i code: function click(){ document.getElementById("h1.
Read more >
HTML : JavaScript button onclick not working - YouTube
HTML : JavaScript button onclick not working [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] HTML : JavaScript button ...
Read more >
HTML Button onclick – JavaScript Click Event Tutorial
The onclick event executes a certain functionality when a button is clicked. This could be when a user submits a form, when you...
Read more >
Button onclick event not working - JavaScript - SitePoint Forums
I have a form which is belong to shopping cart. The button is not submitting data but using an onclick event to add...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found