Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix event.locationX/Y to be in view's coordinate space #1288

Merged
merged 1 commit into from
Jul 25, 2022

Conversation

christophpurrer
Copy link

@christophpurrer christophpurrer commented Jul 25, 2022

Please select one of the following

  • I am removing an existing difference between facebook/react-native and microsoft/react-native-macos 👍
  • I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos 👍
  • I am making a fix / change for the macOS implementation of react-native
  • I am making a change required for Microsoft usage of react-native

Summary

This fixes an issue on macOS where the locationX/Y properties would incorrectly match pageX/Y unlike iOS (see lines 218/219 in the same file) and other platforms.

See #418

Changelog

[macOS] [Fixed] - Fix event.locationX/Y to be in view's coordinate space

Test Plan

Confirmed locationX/Y is now correctly reported in the view's coordinate space.

Before
before

After
after

This fixes an issue on macOS where the `locationX`/`Y` properties would incorrectly match `pageX`/`Y` unlike iOS (see lines 218/219 in the same file) and other platforms.

Confirmed `locationX`/`Y` is now correctly reported in the view's coordinate space.
@christophpurrer christophpurrer requested a review from a team as a code owner July 25, 2022 17:14
@harrieshin harrieshin merged commit f384479 into microsoft:main Jul 25, 2022
@christophpurrer christophpurrer deleted the fixEventLocationXY branch July 25, 2022 23:21
shwanton pushed a commit to shwanton/react-native-macos that referenced this pull request Feb 13, 2023
This fixes an issue on macOS where the `locationX`/`Y` properties would incorrectly match `pageX`/`Y` unlike iOS (see lines 218/219 in the same file) and other platforms.

Confirmed `locationX`/`Y` is now correctly reported in the view's coordinate space.

Co-authored-by: Scott Kyle <skyle@fb.com>
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request May 10, 2023
Summary:
X-link: facebook/yoga#1288

Fixes facebook/yoga#1283

New versions of CMake add "policies" which control how the build system acts wrt breaking changes. By default, CMake will emulate the behavior of the version specified in `cmake_minimum_required`.

Setting a policy to true (to opt into new behavior where `cmake_minimum_required` is lower than the current version) seems actually just error out on the old versions.

Googling around, apparently the way I should be doing this is to specify `<policy_max>` as part of `cmake_minimum_required `. https://gitlab.kitware.com/cmake/cmake/-/issues/20392

This should I think use new policies introduced up to 3.26 (what we test on right now), while letting 3.13 be the minimum.

Differential Revision: D45724864

fbshipit-source-id: 6a5ac596fd5862f53aa7256411f11bed3596f7da
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants