Repository navigation
Keyboard Flickering on TextInput with secureTextEntry #39411
Description
Description
If you have 2 text inputs, (One with secure text entry enabled and the other set to disabled), When typing, highlighting and scrolling in the non-secure text entry, the keyboard will flicker.
This is an iOS issue only, I have tested this using iOS 17, on an iPhone 13 mini. I cannot repeat this issue in the simulator, only on the device.
It appears to be when iOS recognizes it as a login field, so it presents the auto-fill passwords UI. See the attached video on the flickering issue described.
RPReplay_Final1694522683.mov
React Native Version
0.72.4
Output of npx react-native info
System:
OS: macOS 13.4.1
CPU: (10) arm64 Apple M1 Pro
Memory: 115.16 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.3.1
path: /opt/homebrew/bin/node
Yarn:
version: 1.22.19
path: /usr/local/bin/yarn
npm:
version: 9.6.7
path: /opt/homebrew/bin/npm
Watchman:
version: 2023.06.12.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.11.3
path: /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 22.4
- iOS 16.4
- macOS 13.3
- tvOS 16.4
- watchOS 9.4
Android SDK:
API Levels:
- "28"
- "31"
- "32"
- "33"
Build Tools:
- 30.0.2
- 30.0.3
- 32.0.0
- 33.0.0
- 34.0.0
System Images:
- android-30 | Google Play ARM 64 v8a
- android-33 | Google APIs ARM 64 v8a
- android-33 | Google Play ARM 64 v8a
- android-34 | Google APIs ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2022.1 AI-221.6008.13.2211.9619390
Xcode:
version: 14.3.1/14E300b
path: /usr/bin/xcodebuild
Languages:
Java:
version: 18.0.1.1
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.4
wanted: 0.72.4
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Steps to reproduce
Have 2 TextInput components inside a view, one set with secureTextEntry, one without.
This issue is only seen on device, not in simulator
Activity
tianlinjill commentedon Sep 15, 2023
I also encountered the similar issue when in login screen
ShadReyes commentedon Sep 19, 2023
I am experiencing the same on login screens. It's a newer issue. It seems to be caused by the suggested autofill.
The problem is reduce by using default value prop passed to TextInput component that holds its own text ref and passes out ref value on change.
ShadReyes commentedon Sep 19, 2023
I figured out the problem
It appears to be that at some point recently (pre iOS 17) a bug was introduced. Whenever
secureTextEntry={false}andtextContentTypeis set, various Text Input changes (typing, focus, etc...) will fire a nativekeyboardWillChangeFrameevent that causes the keyboard to re-render. This also causes iOS'sAutoFill QuickType Bar(forgive me if my terminology is incorrect) to flicker.This can be especially problematic for any RN apps using
KeyboardAvoidingViewwith iOSbehavior={'position'}since it will cause a layout flicker as it adjusts to the disappearing and reappearingAutoFill QuickType Bar.You can actually see the issue in native iOS apps:
AutoFill QuickType Barflicker.For those who are using KeyboardAvoidingView (RN V0.72.* Patch Fix)
For those who are wrapping their text inputs in a
<KeyboardAvoidingView behavior= 'position'}>and<ScrollView>, you are likely dealing with your screen jumping on text change and focus change.This isn't a pretty solution (and keep in mind it does not fix the root issue of the keyboard re-render), but you can do the following
**TEMPORARY and NOT fully tested**fix for this issue:node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.jsignoreIOSKeyboardWillChangeEvents?: boolean | undefined;to the KeyboardAvoidingView props.node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.d.tsignoreIOSKeyboardWillChangeEvents?: boolean | undefined;to the KeyboardAvoidingView props.const {duration, easing, endCoordinates} = this._keyboardEvent;line with the following:be sure to set
ignoreIOSKeyboardWillChangeEvents={true}with care. I, for example, am only using it on a login screen for a very specific keyboard avoiding use case scenario that I detail above. Hope this helps.ThorANilsson commentedon Oct 3, 2023
RPReplay-Final1696326197.mov
I began seeing this after updating the device i test on (iPhone 14 Pro) to iOS 17. Using Expo Go. Very annoying...
What's interesting is that I am not experiencing this on another iPhone 11 Pro Max, also running iOS 17.
ThorANilsson commentedon Oct 3, 2023
I believe this is caused by the "Passwords"-thing (see attached image) that appears on iOS when the OS believes you want to use a password from your keychain.
When I test on a phone that does not have a keychain, there is no jumping or flickering.

gcon97 commentedon Oct 3, 2023
I can confirm that it is an issue with the Passwords option in the Keyboard toolbar. Seems to be an issue across iOS 17 rather than a ReactNative issue. (It also isn't fixed in iOS 17.1, so we may be waiting a while for a fix).
Closing as it isn't a React Native-specific issue.
ThorANilsson commentedon Oct 4, 2023
Adding
textContentType='oneTimeCode'to your TextInput disables the Password toolbar, which also eliminates the described issue.Shubham0850 commentedon Oct 12, 2023
@ThorANilsson I tried this, but it's not working for me.
mkhoussid commentedon Oct 12, 2023
Here's what I did.
TL;DR: If it's a password field, on each change update the actual string value in a map, and then render the value as bullets (
'•'). What we're essentially doing here is saying that all of our fields are just regular fields without autofill, but we can manipulate the value of the field, if it's a password field, if we pass a certain flag.Somewhere created a file called
maskMap.tswith the following:And in your custom
TextFieldcomponent (I'm assuming most of you have wrappedTextInputinto one of your ownTextFieldcomponents):Engazan commentedon Nov 17, 2023
how this can be closed if its still happening ?
it happends all the time when you have
textContentType="password"orsecureTextEntry86 remaining items
ababol commentedon Jul 22, 2025
Hello folks 👋
I also ran into this issue and wanted to preserve the ability to show the "Passwords" autofill from iOS.
I couldn't find any relevant workarounds online, so I ended up vibe coding my own
KeyboardAvoidingViewbased on the React Native one (behavior="padding").It's essentially the same code but with debouncing added 👍
It's working for me now, and I hope it can help others!
With the react-native
KeyboardAvoidingView:keyboardavoidingview_rvz0jTXS.mov
With the new
KeyboardPasswordsAvoidingView:keyboardpasswordsavoidingview_sNcU7REh.mov
and then you can use it just like a basic
KeyboardAvoidingView:Ario99 commentedon Aug 28, 2025
Still waiting on this issue being properly resolved. I use this patch and update it every time I upgrade to the next react-native version.
ShadReyes commentedon Aug 29, 2025
@Ario99 Same, though I am glad the solution still works for you!
Ario99 commentedon Aug 29, 2025
@ShadReyes thanks for the solution! Would you happen to be using expo sdk 53? I started to upgrade from expo sdk 52 but haven't been able to properly test it yet.
ShadReyes commentedon Sep 4, 2025
@Ario99 I stopped contracting for the company that had the problem described in this issue, so I have not had a chance to test in on Expo 53. Though, I would say it is unlikely that the new Expo version would fix the issues. This is a problem stemming from a native iOS bug that was introduced a little before iOS 17. Though, when I get a second, I can spin up a test app and test it out.
DanielAraldi commentedon Sep 19, 2025
In my RN project version
0.79.3, using iOS 18.7, this problem persists.matinzd commentedon Nov 9, 2025
I can confirm that is also related to Passwords app suggestion on my side as well. When I disable Password & Autofill service in settings everything works properly. For now I have set
textContentType="oneTimeCode"for some of the text inputs in the app.Simulator.Screen.Recording.-.iPhone.16.-.2025-11-09.at.21.30.22.mov
Test/from dev (#159)
Test/from dev : staging (37) 내용 적용됨 (#163)
chizirumizuhara269-rgb commentedon Mar 24, 2026
Yes, that didn't work for me either.
LarsDanau commentedon Mar 31, 2026
Having the same issue, no resolutions yet using Expo SDK
54using react-native-keyboard-controller.apolyanov commentedon Apr 6, 2026
Issue still persists with latest IOS and Expo SDK
chizirumizuhara269-rgb commentedon Apr 10, 2026
@apolyanov Flicker was triggered due to autofill in secure entry field. Below is how I resolved the same in my app.
Set
textContentType="none"andautoCorrect={false}on theTextInputto prevent iOS from treating the fields as login credentials and showing the auto-fill bar:ArturoArdura commentedon Oct 16, 2026
I also encountered the same error while using it only on IOS device not simulator
chizirumizuhara269-rgb commentedon Oct 16, 2026
If you can upgrade you expo version then they already gave us official fix, check this :
https://expo.dev/blog/worklet-integration-in-expo-ui-synchronously-controlling-swiftui-and-compose-state