Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to bind to right mousebutton click in knockoutJs?

I just can't get knockout to bind to the right mousebutton click with the event binding. Mouseover etc. are working fine.

Any suggestions?

Thanks Andreas

like image 255
nttakr Avatar asked Jun 21 '12 11:06

nttakr


1 Answers

Ok...

Right after writing down my question I did find out how to solve it.

But I thought maybe other people run into the same question, so I'll post question and answer at the same time:

You can bind to the right mouseclick by binding to contextmenu :

<tr data-bind="event: { contextmenu: viewModel.ContextMenuClick }">
like image 164
nttakr Avatar answered Sep 28 '22 11:09

nttakr