LockerService, touch events and coordinates

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?


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

Source : Link , Question Author : Christian Menzinger , Answer Author : JF Paradis

Leave a Comment