outline / rich-markdown-editor

The open source React and Prosemirror based markdown editor that powers Outline. Want to try it out? Create an account:
https://www.getoutline.com
BSD 3-Clause "New" or "Revised" License
2.87k stars 588 forks source link

Fix LinkEditor click. #540

Open amazingmarvin opened 3 years ago

amazingmarvin commented 3 years ago

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.