Skip to content

Commit 6b6a27c

Browse files
empyricalfacebook-github-bot
authored andcommitted
TouchEventEmitter: Fix assignment of Y coordinates (facebook#22160)
Summary: This patch fixes the the assignment of Y coordinate information in the event payloads in `TouchEventEmitter`, which were inadvertently being assigned X coordinate data. Pull Request resolved: facebook#22160 Differential Revision: D12943125 Pulled By: shergin fbshipit-source-id: a3fde64c4d6c76784f1a0ac7cae4c0d62f3d4497
1 parent 786df48 commit 6b6a27c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ReactCommon/fabric/components/view/TouchEventEmitter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ namespace react {
1515
static folly::dynamic touchPayload(const Touch &touch) {
1616
folly::dynamic object = folly::dynamic::object();
1717
object["locationX"] = touch.offsetPoint.x;
18-
object["locationY"] = touch.offsetPoint.x;
18+
object["locationY"] = touch.offsetPoint.y;
1919
object["pageX"] = touch.pagePoint.x;
20-
object["pageY"] = touch.pagePoint.x;
20+
object["pageY"] = touch.pagePoint.y;
2121
object["screenX"] = touch.screenPoint.x;
22-
object["screenY"] = touch.screenPoint.x;
22+
object["screenY"] = touch.screenPoint.y;
2323
object["identifier"] = touch.identifier;
2424
object["target"] = touch.target;
2525
object["timestamp"] = touch.timestamp * 1000;

0 commit comments

Comments
 (0)