From a635a73abc352d2ae229d2b0b7569359164e4135 Mon Sep 17 00:00:00 2001 From: Andrei Coman Date: Fri, 24 Apr 2015 09:12:04 -0700 Subject: [PATCH] [react_native] JS files from D2020585: [react_native] Remove focus for TextInputs when they unmount --- Libraries/Components/TextInput/TextInput.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Libraries/Components/TextInput/TextInput.js b/Libraries/Components/TextInput/TextInput.js index fb5f99949..dfd3ab1a1 100644 --- a/Libraries/Components/TextInput/TextInput.js +++ b/Libraries/Components/TextInput/TextInput.js @@ -350,6 +350,9 @@ var TextInput = React.createClass({ componentWillUnmount: function() { this._focusSubscription && this._focusSubscription.remove(); + if (this.isFocused()) { + this.blur(); + } }, _bufferTimeout: (undefined: ?number),