codex-team / codex-team/editor.js

Typed character is duplicated when replacing a selection (single block or cross-block)

Open
#3,012 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
31.9k
Forks
2.2k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

When text is selected (either within a single block or across multiple blocks) and a character is typed to replace the selection, the typed character appears twice instead of once (e.g. typing "a" results in "aa").

### Steps to reproduce:
1. Go to the Editor.js playground (https://editorjs.io/)
2. Type some text into a block, e.g. "Hello world"
3. Select the block(s) with the mouse so they become highlighted (works when selecting a single block, and also when dragging the selection across multiple blocks)
4. Type a single character, e.g. "a"

### Expected behavior:
The selected text is removed and replaced by the single typed character ("a").

### Screencast:
https://github.com/user-attachments/assets/fe7960d3-5984-41ef-ab7e-056c785a2f7b

### Device, Browser, OS:
- Browser: Chrome (latest)
- OS: macOS 26.5.2
- Reproducible on official playground: Yes

### Editor.js version:
- Version: 2.31.6

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.