SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 0 C++

Fix Facsimile Hit Testing Bugs (#52065)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52065

1. We can crash when tapping at the boundary between two spans. Previous ReactTextView had some custom heuristic for overlapping ReactTags, assuming they could be nested, which never happens (We only have a single tag per AttributedString fragment), but spans may overlap at a single character, where one is meant to be exclusive, and the other inclusive. We add logic for that.
2. We don't incorporate the offset of the text layout within the view for hit testing, needed for padding or `textAlignVertical`.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D76764051

fbshipit-source-id: 308756c45d8ff574420dfc1c88678bae7e03e767
N
Nick Gerleman committed
64ce7695f57fc56e3f27989409091df103d7ffc4
Parent: 3ae9328
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 6/17/2025, 3:51:23 AM