Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
composebox: Improve text resetting code, circumvent iOS bug
Fixes: #2434 There is a simple hack/fix for the iOS-specific bug that was a blocker for us migrating the iOS version. If we set the text via `setNativeProps` twice in a row, it will indeed reset the contents, so the first time we use a space `' '` that looks empty but is different than the second time when we set it to an actually empty string '``'. We use `setTimeout` in order to give React Native a chance to update the native value before running the second time. For Android we don't need to call `setNativeProps` as the `TextInputReset.resetKeyboardInput` call does that. Also compared to the previous version we don't need to check if `TextInputReset` is defined as it isn't only for iOS and we `if` for that.
- Loading branch information