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

Model#modifySelection() crash on option+backspace with mixed inline formatting #12657

Closed
niegowski opened this issue Oct 17, 2022 · 0 comments · Fixed by #12676
Closed

Model#modifySelection() crash on option+backspace with mixed inline formatting #12657

niegowski opened this issue Oct 17, 2022 · 0 comments · Fixed by #12676
Assignees
Labels
squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@niegowski
Copy link
Contributor

📝 Provide detailed reproduction steps (if any)

  1. https://ckeditor.com/docs/ckeditor5/latest/examples/builds/classic-editor.html
  2. editor.setData( '<strong>fo</strong><i><strong>o</strong>bar</i>' )
  3. put caret at the end of line
  4. press option+backspace

✔️ Expected result

Word deleted.

❌ Actual result

image

Uncaught TypeError: Cannot read properties of null (reading 'startOffset')
    at snippet.js:4:320608
    at Hh (snippet.js:4:320639)
    at snippet.js:4:324865
    at Wh.modifySelection (snippet.js:4:324968)
    at Wh.<anonymous> (snippet.js:4:6692)
    at Wh.fire (snippet.js:4:3066)
    at <computed> [as modifySelection] (snippet.js:4:6744)
    at Object.callback (snippet.js:4:417073)
    at Wh._runPendingChanges (snippet.js:4:326815)
    at Wh.enqueueChange (snippet.js:4:322856)

❓ Possible solution

If you have ideas, you can list them here. Otherwise, you can delete this section.

📃 Other details

  • Browser: …
  • OS: …
  • First affected CKEditor version: …
  • Installed CKEditor plugins: …

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@niegowski niegowski added type:bug This issue reports a buggy (incorrect) behavior. squad:core Issue to be handled by the Core team. labels Oct 17, 2022
@CKEditorBot CKEditorBot added the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Oct 19, 2022
@niegowski niegowski self-assigned this Oct 19, 2022
arkflpc added a commit that referenced this issue Oct 19, 2022
Fix (engine): ModifySelection with word unit should not stop at the attribute boundary. Closes #12673. Closes #12657.
@CKEditorBot CKEditorBot removed the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Oct 19, 2022
@CKEditorBot CKEditorBot added this to the iteration 58 milestone Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants