question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

issues with controlled TextInput with text replacement, "." shortcut on iOS

See original GitHub issue

React Native version: 0.61.4

Steps To Reproduce

  1. Create a TextInput component:
        <TextInput
          onChangeText={setValue}
          value={value}
        />
  1. In iOS settings > general > keyboard make sure that "." Shortcut is on.
  2. make sure “Check Spelling” is on.
  3. make sure at least one thing is available in “Text Replacement” (omw should be there by default)
  4. within the text input you created type some misspelled text.
  5. press space twice after your text
  6. type the text replacement shortcut

Describe what you expected to happen:

  1. Miss-spelled text should have a red underline
  2. there should be a period when space is pressed twice
  3. text replacement shortcut should be replaced with its matching text.

The above will not be true when using value on a TextInput. If you remove the value prop and have the component uncontrolled the above all works as expected. Also, if the component is made multiline the above all work as expected, even in the controlled case.

Snack, code example, screenshot, or link to a repository:

https://snack.expo.io/H18J_rWlI

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:13
  • Comments:13

github_iconTop GitHub Comments

6reactions
RobPandocommented, Feb 6, 2020

I am running into the same issue. it works when the shortcut is a-z like if you make a text replacement “smh” -> shake my head it works but if it is any special character such as a text replacement “@@” -> user@example.com it does not work UNLESS you enable multiline

1reaction
brightsidercommented, Oct 4, 2021

Any news?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Save keystrokes with text replacements on iPhone
Go to Settings > General > Keyboard, then tap Text Replacement. Tap the Add button at the top right, then enter your word...
Read more >
Why Is My iPhone's Text Replacement & Keyboard Shortcuts ...
Fixes for iPhone Keyboard Shortcuts Not Working (Text Replacement) · Tap Settings > Apple ID Profile > iCloud > Manage Storage > TextInput...
Read more >
Inserting and Replacing Text With Shortcuts - YouTube
https://macmost.com/e-2677 You can use the Shortcuts app on your Mac to create quick text inserts or replacements. The Shortcut can prompt ...
Read more >
How to prevent text replacement from being triggered by ...
I have some text replacement shortcuts configured in my keyboard settings, such as for example ur -> you are . They generally work...
Read more >
How to set up text replacement on your iPhone - The Verge
Go to Settings > General > Keyboard > Text replacement; Tap the plus sign in the upper right corner; Fill in the first...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found