Skip to content

[0.84] Fix multiline TextInput crash from TxDrawD2D reentrancy#15990

Merged
iamAbhi-916 merged 2 commits intomicrosoft:0.84-stablefrom
iamAbhi-916:multiline-textinput-draw-reentry
Apr 15, 2026
Merged

[0.84] Fix multiline TextInput crash from TxDrawD2D reentrancy#15990
iamAbhi-916 merged 2 commits intomicrosoft:0.84-stablefrom
iamAbhi-916:multiline-textinput-draw-reentry

Conversation

@iamAbhi-916
Copy link
Copy Markdown
Contributor

@iamAbhi-916 iamAbhi-916 commented Apr 14, 2026

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Why

when text wraps to a new line RichEdit's TxDrawD2D internally calls TxViewChange, which re-enters DrawText(), causing infinite recursion and a stack overflow.

Resolves [Add Relevant Issue Here]

What

Added m_cDrawBlock reentrancy guard around TxDrawD2D() in DrawText(), matching the existing pattern used for OnTxInPlaceActivate

Screenshots

textinput_multiline_fix.mp4

Testing

locally tested in playground

Changelog

Should this change be included in the release notes: yes

Add a brief summary of the change to use in the release notes for the next release.
Fix multiline TextInput crash from TxDrawD2D reentrancy

Microsoft Reviewers: Open in CodeFlow

@iamAbhi-916 iamAbhi-916 requested a review from a team as a code owner April 14, 2026 16:40
@iamAbhi-916 iamAbhi-916 changed the title Fix multiline TextInput crash from TxDrawD2D reentrancy [0.84] Fix multiline TextInput crash from TxDrawD2D reentrancy Apr 14, 2026
Copy link
Copy Markdown
Contributor

@vineethkuttan vineethkuttan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this issue present only in version 0.84? if not we have to add fix to main as well

@iamAbhi-916
Copy link
Copy Markdown
Contributor Author

Is this issue present only in version 0.84? if not we have to add fix to main as well

Yeah we have to port it to main and previous releases

@iamAbhi-916 iamAbhi-916 merged commit 50927cb into microsoft:0.84-stable Apr 15, 2026
39 checks passed
@iamAbhi-916 iamAbhi-916 deleted the multiline-textinput-draw-reentry branch April 15, 2026 05:15
github-actions Bot pushed a commit that referenced this pull request Apr 15, 2026
* Fix multiline TextInput crash from TxDrawD2D reentrancy

* Change files
github-actions Bot pushed a commit that referenced this pull request Apr 15, 2026
* Fix multiline TextInput crash from TxDrawD2D reentrancy

* Change files
github-actions Bot pushed a commit that referenced this pull request Apr 15, 2026
* Fix multiline TextInput crash from TxDrawD2D reentrancy

* Change files
iamAbhi-916 added a commit that referenced this pull request Apr 16, 2026
… (#16005)

* Fix multiline TextInput crash from TxDrawD2D reentrancy

* Change files
iamAbhi-916 added a commit that referenced this pull request Apr 16, 2026
… (#16004)

* Fix multiline TextInput crash from TxDrawD2D reentrancy

* Change files
iamAbhi-916 added a commit that referenced this pull request Apr 16, 2026
… (#16003)

* Fix multiline TextInput crash from TxDrawD2D reentrancy

* Change files
gmacmaster pushed a commit to Virtual-Fulfillment-Technologies-Inc/react-native-windows-fork that referenced this pull request Apr 16, 2026
…soft#15990) (microsoft#16005)

* Fix multiline TextInput crash from TxDrawD2D reentrancy

* Change files
@vineethkuttan vineethkuttan added this to the 0.84 milestone Apr 20, 2026
acoates-ms added a commit that referenced this pull request Apr 25, 2026
…rformance (#16050)

* Fix ScrollView keyboard scroll drift on long key press (#15988)

* Fix ScrollView keyboard scroll drift on long key press

* Change files

* [0.84] Fix multiline TextInput crash from TxDrawD2D reentrancy (#15990) (#16003)

* Fix multiline TextInput crash from TxDrawD2D reentrancy

* Change files

* Fix touch event handling, improve reliability, and optimize performance (#16048)

* Fix touch event handling, improve reliability, and optimize performance

- Fix touch/pen pointer device type detection and screenPoint coordinates
- Fix touch cancel to include all active touches per W3C spec
- Synthesize touch-cancel for stale pointers and releases outside views
- Fix TextInput pointer message translation (use mouse-style messages for RichEdit)
- Fix ShouldSubmit modifier key checks (altDown, ctrlKey)
- Add null safety to RootComponentView() for island teardown
- Fix Pressability hover timeout and tabIndex focusable mapping
- Cache event path to root to avoid repeated tree walks
- Use unordered_set for pointer capture tracking
- Eliminate O(n²) hit testing by caching visual children
- Skip snap scroll reconfiguration when unchanged
- Improve TextInput reliability: thread-safe loading, null safety, use-after-free fix
- Fix Timing data race and remove duplicate image error allocation
- Use unordered_set for animated node and component registry lookups
- Clean up dead code in ScrollView and simplify Modal event emitter init

* formatting

* Change files

* Update react-native-windows-cd995d7a-4df8-4c73-9b1b-c57b3b886cc6.json

* Touch target

* addressed pr comments

* Crash on invalid index

* revert until rn core pr

* Update react-native-windows-cd995d7a-4df8-4c73-9b1b-c57b3b886cc6.json

* format

* snapshots

---------

Co-authored-by: Gordon MacMaster <31481849+gmacmaster@users.noreply.github.com>
Co-authored-by: Gordon MacMaster <gordomacmaster@gmail.com>

* change files

* Fix some issues with rounded borders (#16051)

* Some fixes for rounded borders

* Change files

* Image snaphots

---------

Co-authored-by: Abhijeet Jha <74712637+iamAbhi-916@users.noreply.github.com>
Co-authored-by: Gordon MacMaster <31481849+gmacmaster@users.noreply.github.com>
Co-authored-by: Gordon MacMaster <gordomacmaster@gmail.com>
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.

2 participants