fix(Inline-toolbar): fake selection stays on screen after toggling convert to (#2768)

* Fix not removing fake selection on convert to toggle

* Update version and changelog

* Update docs/CHANGELOG.md

Co-authored-by: Peter <specc.dev@gmail.com>

---------

Co-authored-by: Peter <specc.dev@gmail.com>
This commit is contained in:
Tatiana Fomina 2024-07-09 21:46:42 +03:00 committed by GitHub
commit ba8fa7344a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 2 deletions

View file

@ -1,5 +1,9 @@
# Changelog
### 2.30.1
- `Fix` Remove fake selection after multiple "convert to" inline tool toggles
### 2.30.0
- `New` Block Tunes now supports nesting items

View file

@ -1,6 +1,6 @@
{
"name": "@editorjs/editorjs",
"version": "2.30.0",
"version": "2.30.1",
"description": "Editor.js — open source block-style WYSIWYG editor with JSON output",
"main": "dist/editorjs.umd.js",
"module": "dist/editorjs.mjs",

View file

@ -127,8 +127,9 @@ export class PopoverInline extends PopoverDesktop {
*/
protected override showNestedItems(item: PopoverItemDefault | PopoverItemHtml): void {
if (this.nestedPopoverTriggerItem === item) {
this.nestedPopoverTriggerItem = null;
this.destroyNestedPopoverIfExists();
this.nestedPopoverTriggerItem = null;
return;
}