Skip to content

Space after italics gets deleted when using keyboard shortcut #12529

@killermann

Description

@killermann

Describe the Bug
When writing, if you use keyboard shortcut for italics (or bold), then hit space before un-italicizing, the space gets deleted when you un-italicize, and any further typing gets italicized and combined to the previous word.

Steps to reproduce the behavior:

  1. Start typing in a text block
  2. Use keyboard shortcut to switch to italics (cmd+i)
  3. Type italicized word, then a space
  4. Use keyboard shortcut to cancel italics (cmd+i)
  5. Type the next word in sentence.

Expected behavior
Ideally, the editor would put a closing tag on the last character before the space, and allow you to keep typing un-italicized (or un-bolded, etc.).

At the very least, there should be a non-breaking space after the character, then the closing tag.

In either case, you would be able to continue writing un-interrupted. Right now, it requires you to use the mouse to fix, or the right arrow key, which is disruptive to the user's writing flow.

Screenshots
Here's a gif of a short video of the behavior: https://imgur.com/iYvzfBG

I hope it helps, because this was a weird one to describe.

Desktop (please complete the following information):

  • OS: MacOS Mojave 10.14.1
  • Browser: Chrome
  • Version 70.0.3538.110

Additional context

  • Gutenberg 4.6.1
  • Replicated on latest WP, as well as latest 5.0RC

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TestingNeeds further testing to be confirmed.[Feature] Rich TextRelated to the Rich Text component that allows developers to render a contenteditable[Feature] Writing FlowBlock selection, navigation, splitting, merging, deletion...[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions