bonafideduck/react-highlight-within-textarea

Bug on mobile browsers

Opened this issue · 3 comments

Bug: Select all -> delete on mobile causes the app to white screen.

I though it was just my app but tested on your demo page and the issue is the same.

Tested with:
Chrome Browser
Android

  • This looks like to be an issue with Draftjs as they state that its not fully compatible with android/ios.

Any way to remove the draftjs and use only the port you done of jquery-highlight-.....?

+1

Facing the same issue on Android Chrome browser
Throws errors "t.blockMap" is not a function

I'm not seeing the issue on IOS Safari. If you really want to use the older port, you can try it at version 1.0.1. It has lots of failures when line wrapping is involved. In addition, I've made a lot of changes with 3.0.0-alpha. In porting to typescript, I may have inadvertently fixed your issue.

gabrii commented

Having the same issue on latest chrome on android, as many of my users as well.

I resolved it by wrapping the component on an error boundry that just resets, and it works.

  <ErrorBoundary
    fallbackRender={({error, resetErrorBoundary }) => (resetErrorBoundary())}
    onReset={details => {}}
  >
     <HighlightWithinTextarea ... />
   </ErrorBoundary>

It's a bad solution, specially as the user looses focus, the keyboard disappears, and they have to click on the text area again (going to try to get some auto focus later to avoid this). But for now this will do for me.