Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editing a link causes the link url to be inserted into the text #10368

Closed
talldan opened this issue Oct 5, 2018 · 2 comments · Fixed by #10372
Closed

Editing a link causes the link url to be inserted into the text #10368

talldan opened this issue Oct 5, 2018 · 2 comments · Fixed by #10372
Assignees
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Type] Bug An existing feature does not function as intended
Milestone

Comments

@talldan
Copy link
Contributor

talldan commented Oct 5, 2018

To Reproduce
Steps to reproduce the behavior:

  1. Add a link in a paragraph block and save the post
  2. Reload the page
  3. Attempt to edit and update the link added in step 1
  4. Observe that the url from the link is inserted into the paragraph text

Expected behavior
The url for the link should have been changed and not inserted

Screenshots
link-container-bug

Additional context

  • I did a bisect and this seems to have occurred when RichText state structure for value manipulation #7890 was merged (cc: @iseulde).
  • It looks to me like the url inserter is falling back to its behaviour of inserting the url when there's no selection. Potentially the selection is lost when the edit/apply buttons are pressed.
@talldan talldan added [Type] Bug An existing feature does not function as intended [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable labels Oct 5, 2018
@ellatrix ellatrix self-assigned this Oct 5, 2018
@ellatrix
Copy link
Member

ellatrix commented Oct 5, 2018

Thanks, I can fix this.

@talldan
Copy link
Contributor Author

talldan commented Oct 5, 2018

Great! I had a quick look, but wasn't quite sure where the issue was occurring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants