1
0
mirror of https://github.com/videojs/video.js.git synced 2025-04-17 12:06:22 +02:00

Remove changedTouches from fixEvent because it doesn't work currently. Add comment about it in the calculateDistance method

This commit is contained in:
Gary Katsevman 2013-03-20 15:27:42 -04:00
parent 37c463d37a
commit a6578d5a5d
2 changed files with 2 additions and 5 deletions

2
src/js/controls.js vendored
View File

@ -646,6 +646,8 @@ vjs.Slider.prototype.calculateDistance = function(event){
boxW = boxW - handleW;
}
// This is done because on Android, event.pageX is always 0 and the actual
// values live under the changedTouches array.
if (pageX === 0 && event.changedTouches) {
pageX = event.changedTouches[0].pageX;
}

View File

@ -172,11 +172,6 @@ vjs.fixEvent = function(event) {
event[prop] = old[prop];
}
if (event.changedTouches && event.pageX === 0 && event.pageY === 0) {
event.pageX = event.changedTouches[0].pageX;
event.pageY = event.changedTouches[0].pageY;
}
// The event occurred on this element
if (!event.target) {
event.target = event.srcElement || document;