1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-11 18:24:43 +02:00

Fix scroll

After fixing the issue on ios, it caused an issue on android that I solved with this commit
This commit is contained in:
marcosvega91 2017-12-19 10:28:52 +01:00
parent 98c0f2315a
commit f2e3bedde6

View File

@ -149,8 +149,11 @@ class NoteScreenComponent extends BaseScreenComponent {
await shared.initState(this); await shared.initState(this);
this.refreshNoteMetadata(); this.refreshNoteMetadata();
this.keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', this._keyboardDidShow.bind(this)); if(Platform.OS === 'ios'){
this.keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', this._keyboardDidHide.bind(this)); this.keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', this._keyboardDidShow.bind(this));
this.keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', this._keyboardDidHide.bind(this));
}
} }
refreshNoteMetadata(force = null) { refreshNoteMetadata(force = null) {
@ -159,8 +162,11 @@ class NoteScreenComponent extends BaseScreenComponent {
componentWillUnmount() { componentWillUnmount() {
BackButtonService.removeHandler(this.backHandler); BackButtonService.removeHandler(this.backHandler);
this.keyboardDidShowListener.remove(); if(Platform.OS === 'ios'){
this.keyboardDidHideListener.remove(); this.keyboardDidShowListener.remove();
this.keyboardDidHideListener.remove();
}
} }
_keyboardDidShow () { _keyboardDidShow () {
@ -539,7 +545,7 @@ class NoteScreenComponent extends BaseScreenComponent {
); );
return ( return (
<KeyboardAvoidingView behavior="padding" style={this.rootStyle(this.props.theme).root}> <KeyboardAvoidingView behavior= {(Platform.OS === 'ios')? "padding" : null} style={this.rootStyle(this.props.theme).root}>
<ScreenHeader <ScreenHeader
folderPickerOptions={{ folderPickerOptions={{
enabled: true, enabled: true,