codex-team / codex-team/editor.js

[Bug] Inline toolbar does not change its position after editing the text

Open
#1,768 0 comments 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

If you end the selection in the middle of a word, and then delete this selected text, the toolbar does not change its position and does not hide.

If, for example, enter a large text, then select and delete all of it, the page will remain long - due to the fact that the position of the toolbar will be style="top: xxxx px;"

Steps to reproduce:

1. Go to https://codepen.io/bertn/pen/WNOvber?editors=1111
2. Insert text of 10-12 lines
3. Select text up to the first line in the middle of a word
4. Press backspace

Expected behavior:
Inline toolbar changes its position and disappears

Screenshots:

Select text
![image](https://user-images.githubusercontent.com/89578935/130954159-7a7c5186-e697-4e1b-a168-609daefd265a.png)

Delete text
![image](https://user-images.githubusercontent.com/89578935/130954791-794afa51-1f0b-4a44-ad3e-3c8584d0362b.png)

When inserting large text and deleting it
![image](https://user-images.githubusercontent.com/89578935/130955298-b111af58-f56f-40b0-8537-f9c3b0c83bd5.png)
![image](https://user-images.githubusercontent.com/89578935/130955934-7d3b7d4f-25ac-4e25-9119-e87449b7f284.png)

Editor.js version: 2.22.2

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.