5

In the past I did access coordinates from touch events like this

myCompElement.addEventListener("touchstart", function(event) {
    var touchObj = event.changedTouches[0];
    var startX = parseInt(touchObj.clientX);
});

but the LockerService prevents accessing event.touches and event.changedTouches on any touch event object.

Is there any workaround accessing coordinates from touch events? What is the recommended way by Salesforce doing this?

2

Both event.touches and event.changedTouches were not exposed but are being added. The fix is will be published next week.

  • 1
    I'm still seeing the same behaviour - is there an ETA for when this might be fixed? I'm getting error reports from people using my SignatureCapture from the component exchange in Salesforce1 and they can't disable the locker service as these are new orgs since Summer 16. Thanks. – Bob Buzzard Sep 5 '16 at 8:42
  • 1
    Thanks JF for the helpful information @ Dreamforce - please don't forget to put the coordinate information of event.touches[] to your roadmap! – Christian Menzinger Oct 4 '16 at 20:09
  • 1
    @SE_User which version of High Charts are you using? I will look into it. – JF Paradis Jul 26 '17 at 15:20
  • 1
    Thanks for the response @JFParadis. I'm using 5.0.12(Yes, the latest stable release which is strict mode compliant). Please see:- e.touches.item is not a function Error on touching Highcharts report in Salesforce1 Ravi Jayaramappa has created a case:-W-4167295. Would be great if you could provide a workaround for the same. Thank you once again. – SE_User Jul 26 '17 at 18:57
  • 1
    I don't think this can be called a specific feature, this issue is specific for scatter chart & activity gauge chart as well. (In other Highcharts reports[like bubble chart, stacked column chart] which are being rendered, there's no such issue when touched anywhere inside the chart(also the tooltips are coming in fine) even the download functionality is working as well.) – SE_User Jul 27 '17 at 5:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.