louis.luo
louis.luo

Reputation: 2971

Right click and Context menu event on ListViewItem

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.

Upvotes: 3

Views: 714

Answers (1)

louis.luo
louis.luo

Reputation: 2971

Answering my own question.

Right click to select ListView items are now a default behaviour in Consumer Preview. You can also use Ctrl+Left Click to select items.

Upvotes: 1

Related Questions