Skip to content

fix(web): preserve browser text replacements outside Firefox - #827

Merged
roryabraham merged 1 commit into
mainfrom
fix/preserve-browser-text-replacements
Nov 11, 2026
Merged

roryabraham merged 1 commit into
mainfrom
fix/preserve-browser-text-replacements

Conversation

@roryabraham

@roryabraham roryabraham commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Details

Restrict the inserted-text reconstruction fallback to Firefox, where it handles a trailing <br> being removed during typing. Chrome and Safari can replace text before the cached selection updates; reconstructing their value from that stale selection restores the replaced word (for example, smile replaced by 😊 becomes smile😊). Preserve the DOM value in those browsers instead.

This ports the source change from Expensify/App#106440. Its CommonJS and ES module bundle edits are generated by this repository's build, so only the source is committed. Native behavior is unchanged.

Related Issues

Expensify/App#106439
Expensify/App#106444

Manual Tests

Already manually tested in E/App

Linked PRs

Expensify/App#106440 — downstream patch containing this fix. A package-version update and patch removal are tracked in Expensify/App#106444 after an upstream release.

@roryabraham
roryabraham requested a review from mountiny November 11, 2026 00:15
@roryabraham
roryabraham marked this pull request as ready for review November 11, 2026 00:15
@roryabraham
roryabraham merged commit 249a426 into main Nov 11, 2026
9 of 10 checks passed
@roryabraham
roryabraham deleted the fix/preserve-browser-text-replacements branch November 11, 2026 06:19
@os-botify

os-botify Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

🚀 Published to npm in 0.1.372 🎉

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