mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1250691 - [Devtools][Responsive mode] The "touchend" event should not have the removed touch. r=jryans
This commit is contained in:
parent
b9a9010687
commit
8832806e81
@ -33,6 +33,8 @@
|
||||
}, true);
|
||||
|
||||
div.addEventListener("touchend", function(evt) {
|
||||
div.style.transform = "none";
|
||||
if (!evt.touches.length) {
|
||||
div.style.transform = "none";
|
||||
}
|
||||
}, true);
|
||||
</script>
|
||||
|
@ -284,9 +284,16 @@ var simulator = {
|
||||
evt.screenX, evt.screenY,
|
||||
evt.clientX, evt.clientY,
|
||||
1, 1, 0, 0);
|
||||
|
||||
let touches = document.createTouchList(point);
|
||||
let targetTouches = touches;
|
||||
let changedTouches = touches;
|
||||
if (name === "touchend" || name === "touchcancel") {
|
||||
// "touchend" and "touchcancel" events should not have the removed touch
|
||||
// neither in touches nor in targetTouches
|
||||
touches = targetTouches = document.createTouchList();
|
||||
}
|
||||
|
||||
touchEvent.initTouchEvent(name, true, true, content, 0,
|
||||
false, false, false, false,
|
||||
touches, targetTouches, changedTouches);
|
||||
|
Loading…
Reference in New Issue
Block a user