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

[Safari] Triple click on links or mentions in image caption and table results in crash #6021

Closed
FilipTokarski opened this issue Dec 20, 2019 · 2 comments · Fixed by #7599
Closed
Assignees
Labels
browser:safari type:bug This issue reports a buggy (incorrect) behavior.

Comments

@FilipTokarski
Copy link
Member

📝 Provide detailed reproduction steps (if any)

This happens only in Safari with links or mentions, and there are a few cases:

First example:

  1. Open localhost:8125/ckeditor5-mention/tests/manual/mention-asynchronous.html
  2. Select image caption text and type '@'
  3. Select one of the mentions
  4. Triple click on the mention
  5. Try to type after the mention

✔️ Expected result

Whole mention should be selected with no crashes

❌ Actual result

App crashes

mentions_err

Errors:

[Error] CKEditorError: model-selection-setTo-not-selectable: Cannot set the selection to the given place. Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-model-selection-setTo-not-selectable

	fire (mention-asynchronous.js:117806)
	domListener (mention-asynchronous.js:115536)
[Error] CKEditorError: model-nodelist-offset-out-of-bounds: Given offset cannot be found in the node list. Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-model-nodelist-offset-out-of-bounds
 {"offset":17,"nodeList":[{"attributes":{"mention":{"_uid":"e4ddfb9107d48ba6631360bb77c68b875","_text":"@angryrabbit821","id":"@angryrabbit821","username":"angryrabbit821","fullName":"Jackson Graves","thumbnail":"https://randomuser.me/api/portraits/thumb/men/61.jpg"}},"data":"@angryrabbit821"},{"data":" "}]}
	fire (mention-asynchronous.js:117806)
	domListener (mention-asynchronous.js:115536)

Second example:

  1. Open ckeditor5 with table plugin
  2. Create a table and create a link in some cell
  3. Triple click on the link

✔️ Expected result

Link should be selected

❌ Actual result

App crashes

Error:

[Error] CKEditorError: model-selection-setTo-not-selectable: Cannot set the selection to the given place. Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-model-selection-setTo-not-selectable

	rethrowUnexpectedError (snippet.js:4:1482)
	fire (snippet.js:4:22271)
	n (snippet.js:4:120568)

📃 Other details

  • Browser: Safari
  • OS: macOS
  • CKEditor version: 5
  • Installed CKEditor plugins: Mention, Table

It also happens the other way round - when you triple click on link in a caption and a mention in a table.

I found some issues related to triple clicking in safari here:
#1677

and here:
#1463

but I guess this is a bit different behaviour.


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

@FilipTokarski FilipTokarski added the type:bug This issue reports a buggy (incorrect) behavior. label Dec 20, 2019
@Mgsy
Copy link
Member

Mgsy commented Dec 20, 2019

Confirmed.

@Mgsy Mgsy added this to the backlog milestone Jan 14, 2020
@oskarwrobel
Copy link
Contributor

It happens also for comments or track changes.

@niegowski niegowski modified the milestones: backlog, iteration 34 Jul 10, 2020
@niegowski niegowski self-assigned this Jul 10, 2020
oleq added a commit that referenced this issue Jul 10, 2020
Fix (widget): Triple-clicking inside an image caption should not crash the editor in Firefox. Closes #7542.

Fix (widget): Triple-clicking a link inside an image caption should not crash the editor in Safari. Closes #6021.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser:safari type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants