@@ -23,7 +23,7 @@ export type KeyboardAwareHOCProps = {
2323 y : number
2424 } ,
2525 enableResetScrollToCoords ?: boolean ,
26- enableAutoAutomaticScroll ?: boolean ,
26+ enableAutomaticScroll ?: boolean ,
2727 extraHeight ?: number ,
2828 extraScrollHeight ?: number ,
2929 keyboardOpeningTime ?: number ,
@@ -40,7 +40,7 @@ function listenToKeyboardEvents(ScrollableComponent: React$Component) {
4040 return class extends React . Component <
4141 KeyboardAwareHOCProps ,
4242 KeyboardAwareHOCState
43- > implements KeyboardAwareInterface {
43+ > implements KeyboardAwareInterface {
4444 _rnkasv_keyboardView : any
4545 keyboardWillShowEvent : ?Function
4646 keyboardWillHideEvent : ?Function
@@ -58,7 +58,7 @@ function listenToKeyboardEvents(ScrollableComponent: React$Component) {
5858 y : PropTypes . number . isRequired
5959 } ) ,
6060 enableResetScrollToCoords : PropTypes . bool ,
61- enableAutoAutomaticScroll : PropTypes . bool ,
61+ enableAutomaticScroll : PropTypes . bool ,
6262 extraHeight : PropTypes . number ,
6363 extraScrollHeight : PropTypes . number ,
6464 keyboardOpeningTime : PropTypes . number ,
@@ -69,7 +69,7 @@ function listenToKeyboardEvents(ScrollableComponent: React$Component) {
6969 }
7070
7171 static defaultProps = {
72- enableAutoAutomaticScroll : true ,
72+ enableAutomaticScroll : true ,
7373 extraHeight : _KAM_EXTRA_HEIGHT ,
7474 extraScrollHeight : 0 ,
7575 enableResetScrollToCoords : true ,
@@ -182,14 +182,13 @@ function listenToKeyboardEvents(ScrollableComponent: React$Component) {
182182
183183 // Keyboard actions
184184 _updateKeyboardSpace = ( frames : Object ) => {
185- let keyboardSpace : number =
186- frames . endCoordinates . height + this . props . extraScrollHeight
187- if ( this . props . viewIsInsideTabBar ) {
188- keyboardSpace -= _KAM_DEFAULT_TAB_BAR_HEIGHT
189- }
190- this . setState ( { keyboardSpace } )
191185 // Automatically scroll to focused TextInput
192- if ( this . props . enableAutoAutomaticScroll ) {
186+ if ( this . props . enableAutomaticScroll ) {
187+ let keyboardSpace : number = frames . endCoordinates . height + this . props . extraScrollHeight
188+ if ( this . props . viewIsInsideTabBar ) {
189+ keyboardSpace -= _KAM_DEFAULT_TAB_BAR_HEIGHT
190+ }
191+ this . setState ( { keyboardSpace } )
193192 const currentlyFocusedField = TextInput . State . currentlyFocusedField ( )
194193 const responder = this . getScrollResponder ( )
195194 if ( ! currentlyFocusedField || ! responder ) {
0 commit comments