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(fabric): Add conditional coordinate space conversion for native view hit testing #2291

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Nov 21, 2024

  1. [fabric] Add conditional coordinate space conversion for native view …

    …hit testing
    
    Summary:
    Native views use the AppKit api for hit testing which requires the point to be in the superview coordinate system.
    
    This diff updates the hit testing in `RCTViewComponentView` to conditionally converts the point to the target view coordinate system only if the tested view is a react view.
    
    Test Plan:
    Run Zeratul with Fabric and select text inside message bubbles. The scroll view being a native view, the hit testing does not require a point conversion. With this change, the text selection works as expected.
    
    | Before | After |
    |--|
    |  https://pxl.cl/3Mlpb  |  https://pxl.cl/3MllN  |
    
    Reviewers: shawndempsey, #rn-desktop
    
    Reviewed By: shawndempsey
    
    Differential Revision: https://phabricator.intern.facebook.com/D51129375
    
    Tags: uikit-diff
    Nick Lefever authored and Saadnajmi committed Nov 21, 2024
    Configuration menu
    Copy the full SHA
    8952e31 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    10c973a View commit details
    Browse the repository at this point in the history