I realize there are already a couple posts on this ( but neither this one or this one have been answered ) so I'd like to ask/articulate the issue here.
I'm developing a node webkit application ( "nw": "^0.12.3" ) and having issues enabling touch events. The following code works in Chrome/Chromium but not in node webkit:
document.body.addEventListener('touchstart', function(e){
alert(e.changedTouches[0].pageX);
}, false);
i've enabled specific flags in nw before by adding "chromium-args" to my package.json ( using this reference ), I've tried doing the same in this instance ( see below ) but nothing seems to work...
"window": {
"toolbar": true,
"frame": true,
"icon": "icon.png",
"show_in_taskbar": false,
"chromium-args" : {
"--enable-touch-events" : true,
"--enable-pinch" : true,
"--enable-touch-drag-drop" : true,
"--touch-events" : true,
"--enable-touch-drag-drop" : true,
"--ash-touch-hud" : true
}
}
also ( for what it's worth )
var nw = require('nw.gui');
nw.Screen.Init();
nw.Screen.screens[0].touchSupport; // returns 0
//...even though the monitor is a touchscreen ( Dell XPS )