I have encountered an issue with my WinJS.UI.ListView setup. The onselectionchanged event is not triggered when right clicking or using Ctrl+Click, even though I have followed the setup similar to working samples. Is there something that I might be missing? Could there be interference affecting only the click selection?
this.m_listView = new WinJS.UI.ListView(this.domNode,
{
layout : {type: WinJS.UI.GridLayout},
itemTemplate : this.itemTemplate.bind(this),
selectionMode: 'multi',
tapBehavior: 'invokeOnly',
swipeBehavior: 'select'
});
this.m_listView.oniteminvoked = this.itemInvoked.bind(this);
this.m_listView.onselectionchanged = this.selectionChanged.bind(this);
EDIT: My datasource assignment is handled in a separate function with these lines
var itemList = new WinJS.Binding.List(this.m_nodes);
this.m_listView.itemDataSource = itemList.dataSource;
The ListView implementation is within a JavaScript class, where the template function is a prototype of my EntriesList class. Here is the simplified version of the template function:
EntriesList.prototype.itemTemplate = function(itemPromise)
{
return itemPromise.then
(
function (item)
{
var entry = document.createElement("div");
entry.className = "tile";
entry.style.height = "120px";
entry.style.width = "340px";
return entry;
}
);