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

Editor crashes after undoing multi-block paste #1278

Closed
Mgsy opened this issue Oct 3, 2018 · 1 comment
Closed

Editor crashes after undoing multi-block paste #1278

Mgsy opened this issue Oct 3, 2018 · 1 comment
Assignees
Labels
type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@Mgsy
Copy link
Member

Mgsy commented Oct 3, 2018

Is this a bug report or feature request? (choose one)

🐞 Bug report

πŸ’» Version of CKEditor

11.0.1

πŸ“‹ Steps to reproduce

  1. Copy some content from two blocks.
  2. Put the caret at the end of the first line of some multi-line block.
  3. Paste.
  4. Undo.

βœ… Expected result

The editor doesn't crash.

❎ Actual result

The editor crashes.

πŸ“ƒ Other details that might be useful

Error

position.js:913 Uncaught TypeError: Cannot read property 'root' of null
    at Function.createFromPosition (position.js:913)
    at new Ur (range.js:34)
    at Zr._getTransformedByMove (range.js:695)
    at Zr._getTransformedByMoveOperation (range.js:506)
    at Zr.getTransformedByOperation (range.js:409)
    at Zr.<anonymous> (liverange.js:131)
    at zl.listenTo (liverange.js:119)
    at zl.fire (emittermixin.js:196)
    at zl.(anonymous function) [as applyOperation] (http://192.168.1.250:8081/build/docs/ckeditor5/latest/snippets/build-classic-source/snippet.js:4:48856)
    at Rh._undo (basecommand.js:161)

GIF

bug_cke5

It doesn't crash if we paste the content at the end of the block.

@Mgsy Mgsy added the type:bug This issue reports a buggy (incorrect) behavior. label Oct 3, 2018
@Reinmar
Copy link
Member

Reinmar commented Oct 3, 2018

This is serious. Adding to the current milestone.

@Reinmar Reinmar added this to the iteration 20 milestone Oct 3, 2018
Reinmar added a commit to ckeditor/ckeditor5-engine that referenced this issue Oct 5, 2018
Fix: `Range#_getTransformedBySplitOperation()` will expand the range if `insertionPosition` is equal to the range end. Modified transformations to align with that change. Closes ckeditor/ckeditor5#1278.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

3 participants