editor.js icon indicating copy to clipboard operation
editor.js copied to clipboard

Bug: clicking outside of an editor should clear currentBlock (call dropPointer) even if selection was inside of editor before the click

Open VikhorKonstantin opened this issue 1 year ago • 2 comments

Describe a bug.

Steps to reproduce:

  1. Go to example_dev.html
  2. Click on somewhere outside of the editor
  3. Press '/'

Expected behavior: Toolbox shouldn't be opened, because I've already went out of the editor by clicking outside

Actual: Toolbox is still opened because we haven't cleared currentBlock

Device, Browser, OS: Any

Editor.js version: 2.29.1

VikhorKonstantin avatar Feb 29 '24 10:02 VikhorKonstantin

Seems like its works only on a second click. Need to debug this code in the ui.ts

image

neSpecc avatar Feb 29 '24 11:02 neSpecc

Seems like its works only on a second click. Need to debug this code in the ui.ts

Seems like I found the issue, could you please check the PR?

VikhorKonstantin avatar Feb 29 '24 12:02 VikhorKonstantin