codex-team / codex-team/editor.js

[Bug] Wrong index from getCurrentBlockIndex()

Open
#2,207 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

### Describe a bug.

**Steps to reproduce:**
1. Create 3 blocks in the following order; 1. Add random text, 2. Keep the second block empty, 3. Add random text on 3rd block
2. For the 3rd block, `getCurrentBlockIndex()` returns wrong index as it skips empty block.

**Expected behavior:**
Should return correct block index regardless of empty blocks inside.

**Device, Browser, OS:**
MacOs

**Editor.js version:**
v2.25.0

This is a serious bug for our use-case, It would be really great to have this fix as soon as possible.

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.