Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to scroll the content inside the editor in android #357

Open
BhavyaCodeAlchemy opened this issue Apr 10, 2024 · 3 comments
Open

Unable to scroll the content inside the editor in android #357

BhavyaCodeAlchemy opened this issue Apr 10, 2024 · 3 comments

Comments

@BhavyaCodeAlchemy
Copy link

Android :
Unable to scroll the content inside the editor

iOS :
Working Fine

I use following versions :

"react": "18.2.0",
"react-native": "0.73.2",
"react-native-pell-rich-editor": "1.8.8",

Description:
When using the editor on the Android platform, I'm encountering an issue where I'm unable to scroll the content inside the editor. This makes it difficult to view and edit longer texts or navigate through the content effectively.

Steps to Reproduce:

  • Open the editor on an Android device.
  • Input or paste a lengthy text into the editor.
  • Attempt to scroll through the content inside the editor.

Expected Behavior:

  • I expect to be able to scroll vertically through the content inside the editor smoothly, allowing me to view and edit the entire text without any hindrance.

`<RichEditor
scrollEnabled
ref={richtext}
initialHeight={50}
keyboardDisplayRequiresUserAction={false}
placeholder={languageService.t(AppConstant.COMMENT)}
style={styles.addCommentEditor}
editorStyle={styles.editorStyle}
onChange={(commentText) => setComment(commentText)}
onFocus={() => setFocusOnComment(true)}
onBlur={() => setFocusOnComment(false)}
/>

{isKeyboardVisible && comment.length > 0 && focusOnComment && (

)}
`

Recordings:

Screen.Recording.2024-04-10.at.5.13.24.PM.mov
Screen.Recording.2024-04-10.at.5.14.23.PM.mov
@prakharjcis
Copy link

I am also facing same issue!

@jbrooks58
Copy link

We are experiencing this same issue as well. Any workaround or fix?

@BhavyaCodeAlchemy
Copy link
Author

Try this solution. It's working for me.

          <RichEditor
            scrollEnabled
            ref={richtext}
            initialHeight={50}
            keyboardDisplayRequiresUserAction={false}
            placeholder={languageService.t(AppConstant.COMMENT)}
            style={styles.addCommentEditor}
            editorStyle={{
              ...styles.editorStyle,
              contentCSSText:
                Platform.OS === 'android' && 'max-height:200px;'
            }}
            onChange={(commentText) => {
              commentText === '<div><br></div>' &&
                richtext.current.setContentHTML('');
              setComment(commentText);
            }}
            onFocus={() => setFocusOnComment(true)}
            onBlur={() => setFocusOnComment(false)}
          />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants