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 = {
12
12
propTypes : {
13
13
enableAutoAutomaticScroll : PropTypes . bool
14
14
} ,
15
- getDefaultProps : function ( ) {
15
+
16
+ getDefaultProps : function ( ) {
16
17
return {
17
18
enableAutoAutomaticScroll : true ,
18
- } ;
19
+ }
19
20
} ,
20
21
21
22
setViewIsInsideTabBar : function ( viewIsInsideTabBar : bool ) {
@@ -45,7 +46,14 @@ const KeyboardAwareMixin = {
45
46
// Automatically scroll to focused TextInput
46
47
if ( this . props . enableAutoAutomaticScroll ) {
47
48
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
+ }
49
57
}
50
58
} ,
51
59
You can’t perform that action at this time.
0 commit comments