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] Trying to merge two blocks that don't have a merge method #1415

Closed
neSpecc opened this issue Nov 5, 2020 · 2 comments · Fixed by #1422
Closed

[Bug] Trying to merge two blocks that don't have a merge method #1415

neSpecc opened this issue Nov 5, 2020 · 2 comments · Fixed by #1422
Labels

Comments

@neSpecc
Copy link
Member

neSpecc commented Nov 5, 2020

In 2.18 release there was a mistake with adding a public access modifier to the block.mergeable getter.

image

And now, it is a public method instead of a getter. As a result, trying to press Backspace between two same blocks (that don't have a merge method) occurs an error:

Unhandled Promise Rejection: TypeError: this.tool.merge is not a function. (In 'this.tool.merge(data)', 'this.tool.merge' is undefined)

Steps to reproduce:

  1. Go to example.html
  2. Make to List blocks
  3. Place the caret at the beginning of the second List
  4. Press Backspace
  5. You'll see an error

Expected behavior:

Error is not thrown.

Editor.js version:

2.19

@neSpecc neSpecc added the bug label Nov 5, 2020
@robonetphy
Copy link
Member

@neSpecc
I replace public with get it working perfectly fine on the paragraph plugin but not for list but there is no error on the console.
is that correct result?

@neSpecc
Copy link
Member Author

neSpecc commented Nov 10, 2020

@neSpecc
I replace public with get it working perfectly fine on the paragraph plugin but not for list but there is no error on the console.
is that correct result?

open a draft pr please, and attach it

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