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

Inline code with backticks stays within the code tag when closing #11276

Closed
cameronjonesweb opened this issue Oct 31, 2018 · 6 comments · Fixed by #13697
Closed

Inline code with backticks stays within the code tag when closing #11276

cameronjonesweb opened this issue Oct 31, 2018 · 6 comments · Fixed by #13697
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

@cameronjonesweb
Copy link
Contributor

Describe the bug
Adding inline code tags using the backtick shortcuts keeps the cursor within the code formatting and forces you to navigate out of it to write normal text.

To Reproduce

  1. Type a backtick in a paragraph block (`)
  2. Write some "code"
  3. Add another backtick to close the inline code formatting
  4. Continue typing. The cursor is still inside the code formatting and it shouldn't be

Expected behavior
After the backtick that closes the code tag is added, the cursor should automatically be outside the code tag as it is in the classic editor

Screencast
https://youtu.be/-pAGqeNckf8

Additional context

  • Gutenberg 4.1.1
@ellatrix
Copy link
Member

Yes, we should fix this. Thanks for the report.

@ellatrix ellatrix self-assigned this Oct 31, 2018
@ellatrix ellatrix added [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 labels Oct 31, 2018
@mtias mtias added this to the WordPress 5.0.x Follow Ups milestone Nov 21, 2018
@mtias mtias added [Type] Enhancement A suggestion for improvement. and removed [Type] Bug An existing feature does not function as intended labels Nov 21, 2018
@swissspidy
Copy link
Member

This is what I'm seeing right now with WordPress 5.0 RC 1:

screen recording 2018-11-29 at 18 09 39

The cursor position is off, and the backticks are only converted when pressing backspace.

@pauljacobson
Copy link

I noticed this too. This issue also applies to some closing HTML tags. Here's a demo of the Markdown issue:

markdown_backticks_formatting_gutenberg

@ellatrix ellatrix added [Type] Bug An existing feature does not function as intended and removed [Type] Enhancement A suggestion for improvement. labels Jan 29, 2019
@phpbits
Copy link
Contributor

phpbits commented May 26, 2019

@ellatrix Can this fix be called via API? I'm having the similar issue when adding custom markdown :

Screen Capture on 2019-05-26 at 12-45-50

Thanks!

@phpbits
Copy link
Contributor

phpbits commented May 27, 2019

@ellatrix Just figure it out :) Driving me crazy but really glad to have it figure out. Thanks!

@richrd
Copy link

richrd commented Oct 1, 2019

@phpbits how did you solve your issue?

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.

8 participants