Hellow, how to write an event handler for the clicking the right mouse button My example template.hbs
`<button {{action "click_button"}} id='my_button'>Click and get result</button>` Controller import Ember from 'ember'; export default Ember.Component.extend({ actions:{ //tried doesn't work //the handler fires only after 2 clicks and number of keystrokes depends on the holding time click_button() { $('#my_button').mousedown(function(event){ event.preventDefault(); if(event.button == 0) console.log('Left button') if(event.button == 2) console.log('Rigth button') }); } } )}
I saw the documentation Handling Events - Components - Ember Guides but could not understand. I need a working example, thanks in advance