basecamp / basecamp/trix

Starting a new paragraph in Safari sometimes doesn't insert text until after two keystrokes

Open
#1,141 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
20k
Forks
1.1k
Avg merge
3d 12h
Merged PRs (30d)
13

Description

Under some circumstances typing at the beginning of a new paragraph requires two keystrokes for text to start appearing.

##### Steps to Reproduce

1. Open https://trix-editor.org/ in Safari
2. Place caret at top of existing Trix document
3. Enter two short paragraphs (a single character each is enough)
4. Start a 3rd paragraph and type a single keystroke, it has no effect
5. Type a second keystroke, suddenly two characters are inserted at once

Clearing the entire document and starting over removes the bug, but adding a single paragraph and then starting over from step 1 (at the top of document) brings the bug back. In other words, there must be text below the caret for the bug to trigger.

##### Details

* Trix version: tried it on 2.0.7 through 2.0.10
* Browser name and version: Safari 17.3.1
* Operating system: macOS

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue at https://trix-editor.org/ in Safari 17.3.1 using the listed steps, then inspect the Trix editor behavior involved in starting a paragraph when text remains below the caret. Done means the first keystroke appears immediately and the two-keystroke reproduction no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.