TextInput Style being Overwritten (iOS) [Solved]

So this is basic summary of the issue:

We have a payment interface that uses a Native SDK that we communicate with through a bridge. If you attempt to purchase something using this payment interface, it spawns it’s own window with input and we have no control over the window at all. If you click cancel without making a payment, all of the TextInput components now appear to have the backgroundColor style attribute set to Grey, however, if you toggle the inspector on the device, no background color is set.

I have tried setting an inline style for the TextInput component to White and have also tried setting it to ‘rgba(0, 0, 0, 0)’ and when I inspect the element it still says the background color is that which I’ve set and not the grey being displayed.

The issue affects ALL TextInputs across the app, not just the page where the native component is invoked and the only way to reset the behaviour is to restart the app. This also only occurs on iOS, we do not see the same behaviour on any of our Android devices.

I’m aware that this not an Expo issue, but I’m rather desperate for a solution so I thought perhaps someone here may have encountered something similar. I’m also aware that sharing some of the code may help with finding a solution but I do not own the code and it is proprietary so, unfortunately, my hands are tied there but I’ll try my best to answer any questions if they might help with solving the issue.

Can u send sample code ?

Unfortunately as mentioned in the original post, the code is proprietary so I couldn’t share anything.

That being said we have managed to find the issue, it was a native third party SDK that we were integrating with over a bridge and somewhere in their codebase they were globally setting the color of all UITextFields to grey and it seems RN builds their TextInput blocks on top of the UTextField component and that’s why the color was shining through.

We solved the issue by resetting the color to transparent on any return from the third party SDK in the bridge.

Good luck

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.