Skip to content

Highlighted formatting in the toolbar doesn't match MCE inline boundaries #11091

Closed
@talldan

Description

Duplicates: #11326, #13087.

Describe the bug
There's a minor inconsistency with the formatting toolbar and TinyMCE's inline boundaries (used to highlight formatted text).

When the caret is positioned on the left side of formatted text, within the inline boundary, the toolbar button for the active formatting is correctly shown toggled on:
screen shot 2018-10-26 at 4 05 40 pm

Pressing the left arrow key once to move the caret outside of the inline boundary, the format is incorrectly still shown toggled on:
screen shot 2018-10-26 at 3 57 50 pm

Positioning the caret on the right side of formatted text, back within the inline boundary, the toolbar button is incorrectly toggled off:
screen shot 2018-10-26 at 3 52 46 pm

To Reproduce
Steps to reproduce the behavior:

  1. Add formatted text (bold/italic/strikethrough/link) to a paragraph block.
  2. Position the caret on the left of the formatted text within the inline boundary.
  3. Move the mouse to display the toolbar and observe that formatting is toggled on correctly.
  4. Press the left arrow key once to move outside of the inline boundary.
  5. Move the mouse to display the toolbar and observe that formatting is incorrectly toggled on.
  6. Position the caret on the right of the formatted text within the inline boundary.
  7. Move the mouse to display the toolbar and observe that formatting is incorrectly toggled off.

Expected behavior
The toggle state of toolbar formats should match the position of the caret.

Additional context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    [Package] Rich text/packages/rich-text[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended[Type] RegressionRelated to a regression in the latest release

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions