question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RichTextEditor collapsing on Android

See original GitHub issue

Description: It looks like when editor loses focus it collapses to 0px height. This happens by pressing the Hardware back button on android. It also sometimes happens when I press focus an other input and then remove focus from that input.

This doesnt affect iOS.

dependancies: react: 17.0.1 (same for 16.13.1) react-native: 0.63.4 react-native-pell-rich-editor: 1.5.5 (same for 1.3.0) (latest 1.6.x version crashes my app when trying to load an image that does’nt exist) react-native-webview: 9.0.2 (tried latest and errors with onMessage something) react-native-navigation: 6.12.2 (editor is inside a modal from this package)

Steps to reproduce:

  1. Open a modal
  2. focus editor
  3. press Device back button

Additional information: This problem appeared after upgrading our app from react-native 0.61 to 0.63.

Component has nothing really complicated

<RichTextEditor
    ref={r => (this.richtext = r)}
    style={[t.mL1, t.flex1, t.h16, t.pT50]}
    initialContentHTML={this.initialContent}
/>

Screenshot_20210115_170933_com huawei himovie overseas Screenshot_20210115_170936_com huawei himovie overseas

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Bilal-Abdeencommented, Apr 29, 2022

This seems to be a problem with react-native-webview. I used the following to fix it.

<RichEditor 
  .... 
  androidLayerType="software"
/>
0reactions
dhruvpvxcommented, Aug 5, 2022

This seems to be a problem with react-native-webview. I used the following to fix it.

<RichEditor 
  .... 
  androidLayerType="software"
/>

still problem occurs in android

I this this is because very long strings in between html tags

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rich text editor not showing in bootstrap collapsible accordion
I have a blazor SfRichTextEditor inside a bootstrap collapsible accordion in which the div section is initially collapsed.
Read more >
About the Rich Text editor | Joplin
It is not possible to have multiple new lines in a row. Because in Markdown, multiple new lines would be collapsed into one...
Read more >
Use the rich text editor control in Power Apps - Microsoft Learn
The rich text editor control provides the app user a WYSIWYG editing ... This property adds the full screen expand/collapse functionality, ...
Read more >
Rich Text Editor Document: editor.collapse(bStart)
Rich Text Editor Document: editor.collapse(bStart) ... Collapses the current selection to a single point. The bStart is a boolean value.
Read more >
Building A Rich Text Editor (WYSIWYG) - Smashing Magazine
A collapsed range/selection denotes where anchor and focus points are ... application and get a basic rich-text editor going with SlateJS.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found