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
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
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 }">
ContextMenuClick
is the function you'll create within your knockout vm, and will likely rename. For example in my case: event: { contextmenu: handleRightClick }
–
Bangka © 2022 - 2024 — McMap. All rights reserved.