In my current implementation of listview with gridlayout in Javascript, if I right click on an item, a context menu which reads "Copy" shows up. I would like to overwrite this context menu event to select the element instead of showing "Copy".

So I would need to addEventListener on the listViewItem to listen to the context menu event. How will I be able to set the event listener on the listviewitems?

I tried to addEventListener on the listview, but I don't know how to check whether the srcElement is a item or not.

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top