File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ export default class KeyboardSpacer extends Component {
105105 // when external physical keyboard is connected
106106 // event.endCoordinates.height still equals virtual keyboard height
107107 // however only the keyboard toolbar is showing if there should be one
108- const keyboardSpace = ( screenHeight - event . endCoordinates . screenY ) + this . props . topSpacing ;
108+ const keyboardSpace = screenHeight - event . endCoordinates . screenY ;
109109 this . setState ( {
110110 keyboardSpace,
111111 isKeyboardOpened : true
@@ -135,6 +135,17 @@ export default class KeyboardSpacer extends Component {
135135
136136 render ( ) {
137137 return (
138- < View style = { [ styles . container , { height : this . state . keyboardSpace } , this . props . style ] } /> ) ;
138+ < View
139+ style = { [
140+ styles . container ,
141+ {
142+ height :
143+ this . state . keyboardSpace +
144+ ( this . state . isKeyboardOpened ? this . props . topSpacing : 0 )
145+ } ,
146+ this . props . style
147+ ] }
148+ />
149+ ) ;
139150 }
140151}
You can’t perform that action at this time.
0 commit comments