react-native-zss-rich-text-editor icon indicating copy to clipboard operation
react-native-zss-rich-text-editor copied to clipboard

Scrolling not working properly

Open mayankbaiswar-CSE opened this issue 7 years ago • 8 comments

I tried to integrate your library, but when I scroll to the end it automatically scrolls back toward top approx 50 points from the bottom.

Steps to reproduce:

  1. Provide the content of at least one page. So, that scrolling gets enable.
  2. Now when you press return key from the keyboard, in this case, you won't be able to see the cursor actually, it goes beyond the keyboard.
  3. Even if you tried to scroll to the end, it automatically scrolls back toward top approx 50 to 60 points from the bottom.

ezgif com-video-to-gif

mayankbaiswar-CSE avatar Apr 26 '18 13:04 mayankbaiswar-CSE

+1

quy1403 avatar Apr 27 '18 18:04 quy1403

@artald @yevhenpavliuk @EdenGottlieb plz help us, thanks u so much

quy1403 avatar Apr 27 '18 18:04 quy1403

+1...

tzurae avatar May 09 '18 14:05 tzurae

anyone solved this problem?? help~~ :(

astraeapark avatar May 16 '18 06:05 astraeapark

I got the quick fix for this

You just need to modify the below code of line in RichTextEditor.js const editorAvailableHeight = Dimensions.get('window').height - keyboardHeight - spacing; with const editorAvailableHeight = Dimensions.get('window').height - keyboardHeight - spacing - 80;

It works perfectly for me.

jaspal-singh-gulati avatar May 24 '18 06:05 jaspal-singh-gulati

oh! I also solved it.

react-native-zss-rich-text-editor/src/RichTextEditor.js

origin) const editorAvailableHeight = Dimensions.get('window').height - keyboardHeight - spacing; ==> my code) const editorAvailableHeight = Dimensions.get('window').height - (keyboardHeight*2) - spacing;

it works perfectly for me

astraeapark avatar May 28 '18 07:05 astraeapark

+1 UPD: Solved with: this.richtext.setEditorHeight(50);

cherniv avatar Jun 05 '18 16:06 cherniv

I ended up solving it using the prop contentInset={{ bottom: 140 }} on the editor which is applied as extra spacing. Eliminates the need to edit react-native-zss-rich-text-editor/src/RichTextEditor.js

arneson avatar Oct 12 '18 10:10 arneson