Open Bug 1398724 Opened 7 years ago Updated 2 years ago

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

Categories

(Core :: DOM: Editor, defect, P3)

52 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: info, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [h2review-noted])

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.
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
Whiteboard: [h2review-noted]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.