react-native-cn-quill icon indicating copy to clipboard operation
react-native-cn-quill copied to clipboard

Unable to scroll editor content

Open avinashyalgonde opened this issue 3 years ago • 12 comments

@imnapo I am unable to scroll editor content after adding multiple lines. Is there any way to scroll content?

avinashyalgonde avatar Apr 05 '21 14:04 avinashyalgonde

yes, It should scroll the content. I've checked the example project and it's working as expected. Please post your code here to be able to help you.

imnapo avatar Apr 07 '21 04:04 imnapo

In Android, I am able to scroll when keyboard is closed. But as soon as I open keyboard editor stops scrolling.

swapnilgaikwad1507 avatar Apr 15 '21 10:04 swapnilgaikwad1507

@swapnilgaikwad1507 same for me. Let me know if you find any solution

avinashyalgonde avatar Apr 16 '21 08:04 avinashyalgonde

same problem in "react-native-cn-quill": "^0.7.8" unable scroll input multiline android, only is possible with text selector

EstebanIndiveri avatar Oct 01 '21 19:10 EstebanIndiveri

if quill editor is inside scrollview, quill editor scroll not working for long text. it's not working in android only - in ios, it performs well.

AustinWood avatar Dec 07 '21 20:12 AustinWood

quill editor is embedded in webview and it is known bug of react native that webview is not scrollable inside scrollview. if someone encountered this problem, please let me know solution. Thanks!

AustinWood avatar Dec 07 '21 22:12 AustinWood

this issue can be fixed by setting nestedScrollEnabled to true in renderWebview function of quill-editor.tsx. and also, set scrollEnabled props to true and simply run 'npx patch-package react-native-cn-quill' to make patch.

nestedScrollEnabled props is newly defined in recent react-native-webview so you would need to upgrade that module first if it's old.

AustinWood avatar Dec 08 '21 19:12 AustinWood

You may pass any property of react-native-webview to QuilEditor like below:

<QuillEditor
          webview={{
            scrollEnabled: true,
            nestedScrollEnabled: true,
          }}
/>

imnapo avatar Jun 10 '22 17:06 imnapo

You may pass any property of react-native-webview to QuilEditor like below:

<QuillEditor
          webview={{
            scrollEnabled: true,
            nestedScrollEnabled: true,
          }}
/>

It worked, but the toolbar is not showing anymore after scrolling down

HimikoT-T avatar Jul 01 '22 08:07 HimikoT-T

The proposed solution of setting the webview props fixed the issue on iOS for me but it did not fix android. My component structure looks something like this:

<KeyboardAvoidingScrollView
  scrollEnabled={true}
  nestedScrollEnabled
  keyboardShouldPersistTaps="handled"
>
  <Editor />
</KeyboardAvoidingScrollView>

and the Editor looks like this:

<View style={styles.container}>
  <QuillEditor
    quill={{
      placeholder: placeholder || '',
      modules: {
        toolbar,
      },
    }}
    webview={{
      scrollEnabled: true,
      nestedScrollEnabled: true,
      style: webViewStyles,
    }}
    autoSize
    container={true}
    style={styles.editor}
    ref={_editor}
    customStyles={customStyles}
  />
</View>

If I remove the autoSize prop, it works, but I need the auto sizing. Any ideas?

tylerrhinehart avatar Apr 18 '23 19:04 tylerrhinehart

Were you able to fix it @tylerrhinehart ?

JacobDel avatar May 09 '23 18:05 JacobDel

@JacobDel I was not able to fix it. After working on this for two solid days, I decided it wasn't worth any more time. I ended up keeping it simple and having a fixed height.

tylerrhinehart avatar May 09 '23 22:05 tylerrhinehart