react-draft-wysiwyg icon indicating copy to clipboard operation
react-draft-wysiwyg copied to clipboard

Fix to focus editor when null

Open felixminom opened this issue 4 years ago • 6 comments

Steps to reproduce.

  1. Create two components with react-draft-wysiwyg one in readOnly mode and the other in editing mode.

  2. If the readOnly mode component is clicked the editing component is rendered instead of the readOnly.

  3. Since the readOnly component was removed from DOM this error will appear on the console.

image

The problem is solved when the focusEditor function is wrapped with an if statement in order to verify that the Editor still exists.

This fix also works for the test that was commented as pending and the #712 issue.

@jpuri We'll love to contribute to this library, let us know if something is missing or can be improved.

felixminom avatar Jun 23 '20 13:06 felixminom

We are facing the same issue too. Can this PR be merged in and released?

prabinv avatar Jul 14 '20 00:07 prabinv

We also have the same issue from #712 Hoping this can be merged and released.

aubrey54 avatar Sep 26 '20 16:09 aubrey54

We are got this issue too, it does not break anything but it's annoying especially when we use error tracking tool, this error is captured a lot. Hope this can be merged and release soon.

tonynguyenit18 avatar Aug 11 '21 23:08 tonynguyenit18

Hey @jpuri, hope you're doing well. I think this could be safely merged, and taking into account that other people is facing the same issue I think it will be a good contribution. Let us know if we need to change/add something.

felixminom avatar Oct 07 '21 17:10 felixminom

Hi @jpuri @felixminom , do we have any roadmap when we can merge and release this?

martin-luo avatar Jan 03 '24 00:01 martin-luo

Hey @martin-luo unfortunately I haven't gotten an answer, I see that this PR is all good to be merged. @jpuri if it's all good on your side, could you please merge it?

felixminom avatar Jul 09 '24 14:07 felixminom