Skip to content

Cursor is hidden in inline RichText elements with background-color #7575

@mirka

Description

@mirka

Describe the bug
The blinking text cursor (caret) does not appear when the RichText is an inline element, and a non-transparent background color is set.

To Reproduce

// Cursor is hidden
<RichText
  tagName="span"
  style={{ backgroundColor: 'yellow' }}
  value="RichText span (inline)"
/>

// Cursor appears
<RichText
  tagName="span"
  style={{ backgroundColor: 'yellow', display: 'inline-block' }}
  value="RichText span (inline-block)"
/>

Expected behavior
Cursor should appear, or the limitation should be documented.

Screenshots
Chrome:
chrome

Safari:
safari

In Safari you can see that the cursor is hidden underneath. Indeed, the cursor is visible when background-color: transparent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] Rich TextRelated to the Rich Text component that allows developers to render a contenteditable

    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