Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Splitting a block does not create "block-changed" event on the source block. #2230

Open
krisnik opened this issue Dec 30, 2022 · 4 comments
Assignees
Labels

Comments

@krisnik
Copy link

krisnik commented Dec 30, 2022

Describe a bug.

If I click enter in somewhere in the block, a new block gets created from the caret position.

However for the source block which got split, does not get a "block-changed" event.

Steps to reproduce:

  1. Go to … Add some text to paragraph block.
  2. Click on … Click enter somewhere in middle of the text. A new block with content from the caret position get created

Expected behavior:

  • Block Added event for new block. ✅
  • Block Changed event for the block which got split. ❌

From the source code, only a insert operation is invoked which results in "block-added" event.

public split(): Block {

Screenshots:

Device, Browser, OS:

Editor.js version:
2.26.4

Plugins you use with their versions:

@krisnik
Copy link
Author

krisnik commented Apr 4, 2023

Hello @HyTekCoop - Did you get a chance to pick up fix for this issue?

@HyTekCoop
Copy link
Member

Hello @krisnik - Sorry for the long answer. Thank you for noticing the bug and writing to us about it. We studied it and found a solution. Here in the comments you can see a pull request with a solution to this bug.

@krisnik
Copy link
Author

krisnik commented Apr 7, 2023

Thanks for sharing the fix @HyTekCoop. Appreciate it.

@krisnik
Copy link
Author

krisnik commented May 1, 2023

@HyTekCoop - The PR is open for a while. Could you please take it to closure. Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants