Open Bug 1748239 Opened 2 years ago Updated 2 years ago

Cursor disappears behind background of element with position:relative and background-color set

Categories

(Core :: DOM: Editor, defect)

Firefox 95
defect

Tracking

()

UNCONFIRMED

People

(Reporter: jameshfisher, Unassigned)

References

Details

Attachments

(1 file)

Attached file bug.html

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36

Steps to reproduce:

  1. Create a contenteditable element
  2. Create a <span style='position: relative; background-color: red'> inside it
  3. Put the caret/cursor in the <span>

(Or open the attached bug.html)

Actual results:

The caret does not appear

Expected results:

The caret appears

As with the same bug in Chromium, z-index: -1 is a kind of workaround, but causes other problems

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Editor' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → DOM: Editor
Product: Firefox → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: