Title: [250667] trunk/LayoutTests
- Revision
- 250667
- Author
- [email protected]
- Date
- 2019-10-03 12:25:46 -0700 (Thu, 03 Oct 2019)
Log Message
REGRESSION: touchend doesn't trigger on element when touch is released outside of its bounds
https://bugs.webkit.org/show_bug.cgi?id=202527
<rdar://55883213>
Patch by Antoine Quint <[email protected]> on 2019-10-03
Reviewed by Dean Jackson.
Add a test that checks a scenario where an element that listens to "touchstart", "touchmove" and "touchend" events
is only the target of move-phase touches but neither start and end phases. The code change that fixes the reported
issue where the "touchend" wouldn't be dispatched is done in Internal.
* pointerevents/utils.js:
(EventTracker.prototype.handleEvent):
(EventTracker.prototype._handleTouchEvent):
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (250666 => 250667)
--- trunk/LayoutTests/ChangeLog 2019-10-03 19:03:57 UTC (rev 250666)
+++ trunk/LayoutTests/ChangeLog 2019-10-03 19:25:46 UTC (rev 250667)
@@ -1,3 +1,19 @@
+2019-10-03 Antoine Quint <[email protected]>
+
+ REGRESSION: touchend doesn't trigger on element when touch is released outside of its bounds
+ https://bugs.webkit.org/show_bug.cgi?id=202527
+ <rdar://55883213>
+
+ Reviewed by Dean Jackson.
+
+ Add a test that checks a scenario where an element that listens to "touchstart", "touchmove" and "touchend" events
+ is only the target of move-phase touches but neither start and end phases. The code change that fixes the reported
+ issue where the "touchend" wouldn't be dispatched is done in Internal.
+
+ * pointerevents/utils.js:
+ (EventTracker.prototype.handleEvent):
+ (EventTracker.prototype._handleTouchEvent):
+
2019-10-03 youenn fablet <[email protected]>
Regression: iOS 13.1 MediaStreamTrack.enabled = false kills audio track
Added: trunk/LayoutTests/fast/events/touch/ios/touchstart-and-touchend-outside-touchmove-target-expected.txt (0 => 250667)
--- trunk/LayoutTests/fast/events/touch/ios/touchstart-and-touchend-outside-touchmove-target-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/events/touch/ios/touchstart-and-touchend-outside-touchmove-target-expected.txt 2019-10-03 19:25:46 UTC (rev 250667)
@@ -0,0 +1,3 @@
+
+PASS Testing that starting and ending an interaction outside of an element while touching over it in between correctly dispatches a touchend event.
+
Added: trunk/LayoutTests/fast/events/touch/ios/touchstart-and-touchend-outside-touchmove-target.html (0 => 250667)
--- trunk/LayoutTests/fast/events/touch/ios/touchstart-and-touchend-outside-touchmove-target.html (rev 0)
+++ trunk/LayoutTests/fast/events/touch/ios/touchstart-and-touchend-outside-touchmove-target.html 2019-10-03 19:25:46 UTC (rev 250667)
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+</head>
+<body style="overflow: hidden">
+<script src=""
+<script src=""
+<script src=""
+<script>
+
+'use strict';
+
+target_test({ width: "200px", height: "200px" }, (target, test) => {
+ const eventTracker = new EventTracker(target, ["touchstart", "touchmove", "touchend"]);
+
+ const _one_ = ui.finger();
+ ui.sequence([
+ one.begin({ x: 10, y: 400 }),
+ one.move({ x: 100, y: 100 }),
+ one.move({ x: 10, y: 400 }),
+ one.end()
+ ]).then(() => {
+ eventTracker.assertMatchesEvents([
+ { type: "touchstart" },
+ { type: "touchmove" },
+ { type: "touchend" }
+ ]);
+ test.done();
+ });
+}, `Testing that starting and ending an interaction outside of an element while touching over it in between correctly dispatches a touchend event.`);
+
+</script>
+</body>
+</html>
\ No newline at end of file
Modified: trunk/LayoutTests/pointerevents/utils.js (250666 => 250667)
--- trunk/LayoutTests/pointerevents/utils.js 2019-10-03 19:03:57 UTC (rev 250666)
+++ trunk/LayoutTests/pointerevents/utils.js 2019-10-03 19:25:46 UTC (rev 250667)
@@ -59,6 +59,8 @@
this._handlePointerEvent(event);
else if (event instanceof MouseEvent)
this._handleMouseEvent(event);
+ else if (event instanceof TouchEvent)
+ this._handleTouchEvent(event);
}
_handlePointerEvent(event)
@@ -88,6 +90,11 @@
});
}
+ _handleTouchEvent(event)
+ {
+ this.events.push({ type: event.type });
+ }
+
assertMatchesEvents(expectedEvents)
{
assert_true(!!this.events.length, "Event tracker saw some events.");
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes