rich-markdown-editor icon indicating copy to clipboard operation
rich-markdown-editor copied to clipboard

Fix LinkEditor click.

Open amazingmarvin opened this issue 3 years ago • 0 comments

I found a bug where clicking the "Open link" doesn't work correctly during link creation.

Steps to reproduce bug:

  1. Press / and add a link
  2. Type example.com
  3. Click Open link image

onClickLink is then called with href="", whereas I expected href="example.com". Using this.state.value instead of this.href fixed the issue for me. That being said I have no idea where this.href comes from or if/when/how it's modified. Maybe this was supposed to be this.props.href everywhere? Though it would still make sense to use this.state.value in that case to use the updated value.

amazingmarvin avatar Sep 01 '21 08:09 amazingmarvin