File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,11 @@ const KeyboardAwareMixin = {
1212 propTypes : {
1313 enableAutoAutomaticScroll : PropTypes . bool
1414 } ,
15- getDefaultProps : function ( ) {
15+
16+ getDefaultProps : function ( ) {
1617 return {
1718 enableAutoAutomaticScroll : true ,
18- } ;
19+ }
1920 } ,
2021
2122 setViewIsInsideTabBar : function ( viewIsInsideTabBar : bool ) {
@@ -45,7 +46,14 @@ const KeyboardAwareMixin = {
4546 // Automatically scroll to focused TextInput
4647 if ( this . props . enableAutoAutomaticScroll ) {
4748 const currentlyFocusedField = TextInput . State . currentlyFocusedField ( )
48- this . scrollToFocusedInputWithNodeHandle ( currentlyFocusedField )
49+ if ( ! currentlyFocusedField ) {
50+ return
51+ }
52+ try {
53+ this . scrollToFocusedInputWithNodeHandle ( currentlyFocusedField )
54+ } catch ( e ) {
55+
56+ }
4957 }
5058 } ,
5159
You can’t perform that action at this time.
0 commit comments