Skip to content

A text selection which exactly matches a markup inline style does not replace the text when typing. #44263

@merlijnvanlent

Description

@merlijnvanlent

Description

Typing when text is selected replaces the selected text with whatever you are typing.
However, when a text selection matches a Marked piece of text the selection is not replaced.

Step-by-step reproduction instructions

  1. When editing a post
  2. Create a piece of text with a marked colour
  3. Select the exact same characters as the earlier marked text.
  4. Start typing the new text.
  5. Text is not replaced.

Screenshots, screen recording, code snippet

Screen.Recording.2022-09-19.at.13.57.32.mov

Please see the bottom left corner of the screen for keystrokes. :)

Environment info

  • WP Version 6.0.2, With or without Gutenberg plugin still an issue (as of creation current Gutenberg plugin version is: 14.1.0)
  • macOS: 12.5.1
  • Chrome: 105.0.5195.125

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Package] Rich text/packages/rich-text[Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions