adding a whitespace-only span to the end of a contenteditable only succeeds on second try

UNCONFIRMED
Unassigned

Status

()

P3
normal
UNCONFIRMED
a year ago
a year ago

People

(Reporter: info, Unassigned)

Tracking

52 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a year ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20170808215255

Steps to reproduce:

In this fiddle, I try to add a space at the end. The div unfocuses. The second time, I can add a space: https://jsfiddle.net/xd4egroe/

The fiddle has functionality to break the content of the contenteditable in spans of one character.


Actual results:

The first time, the div unfocuses and the space is not added. The second time, the space is added and the div stays focused.


Expected results:

The first time should be like the second time.
(Reporter)

Comment 1

a year ago
Note: removing the caret position functionality makes the cursor move to the beginning of the div when you type a space (the space is not added).
Component: Untriaged → Editor
Product: Firefox → Core
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.