Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compose: Drop TextInput workaround on clearing contents
This library was a workaround for a bug in React Native's TextInput component: it doesn't tell the keyboard to refresh its state after the app changes the text contents programmatically. The workaround only operates in the case where we're clearing the contents entirely. When we update it in any other way, such as for autocomplete, we're still exposed to this RN bug; that's zulip#5072. And then it turns out that since RN v0.60.0, this workaround has been superseded by one in RN which also operates only in the case of completely clearing the contents: zulip#4239 (comment) So we can happily drop it. I tested this manually on a device which I know is affected by the underlying RN bug, because it reproduces zulip#5072: a Samsung J5 (model SM-J510FN) running Android 6.0.1 and Samsung Keyboard 1.5.46. (From other reports I believe these issues appear on recent Samsung devices too; that's just the one I have on hand.) I sent a message, causing us to clear the input. The keyboard state refreshed as it should: typing a new letter inserted only that letter, not also the last word typed in the previous message. Fixes: zulip#4239
- Loading branch information