Handle pointerup events as well as lostpointercapture. to make  selenium tests work on FF.
+ fixed wrong Math.abs call.