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

Bookmarks are created inside filler #3423

Closed
Comandeer opened this issue Sep 17, 2019 · 0 comments · Fixed by #3487
Closed

Bookmarks are created inside filler #3423

Comandeer opened this issue Sep 17, 2019 · 0 comments · Fixed by #3487
Assignees
Labels
browser:chrome The issue can only be reproduced in the Chrome browser. browser:safari The issue can only be reproduced in the Safari browser. plugin:widgetselection The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:bug A bug.
Milestone

Comments

@Comandeer
Copy link
Member

Type of report

Bug

Provide detailed reproduction steps (if any)

  1. Open https://jsfiddle.net/Comandeer/yecqv9po/
  2. Open console.
  3. Select all content inside the editor.
  4. Click button below the editor.

Expected result

There is no error inside the console.

Actual result

There is error inside the console:

Uncaught TypeError: Cannot read property 'getParent' of null
    at CKEDITOR.dom.range.setStartBefore (ckeditor.js:181)
    at CKEDITOR.dom.range.moveToBookmark (ckeditor.js:164)
    at CKEDITOR.dom.selection.selectBookmarks (ckeditor.js:486)
    at CKEDITOR.dom.element.<anonymous> ((index):46)
    at CKEDITOR.dom.element.l (ckeditor.js:10)
    at CKEDITOR.dom.element.fire (ckeditor.js:12)
    at HTMLButtonElement.<anonymous> (ckeditor.js:72)

Other details

After selecting all content, widgetselection creates temporal div at the beginning of the content, which is deleted when selection is changed. However Chrome and Safari creates start bookmark inside this temporal element. When selection changes, div is deleted with a bookmark inside it, causing an error when then trying to select bookmarks.

The issue is present in 4.8.0+ even if there are no widgets inside the editor, due to the fact that uploadimage is a default part of presets and it requires widgetselection.

  • Browser: Chrome, Safari
  • CKEditor version: 4.8.0+
  • Installed CKEditor plugins: widgetselection
@Comandeer Comandeer added type:bug A bug. browser:chrome The issue can only be reproduced in the Chrome browser. browser:safari The issue can only be reproduced in the Safari browser. plugin:widgetselection The plugin which probably causes the issue. labels Sep 17, 2019
@Comandeer Comandeer self-assigned this Sep 17, 2019
Comandeer added a commit that referenced this issue Sep 17, 2019
f1ames pushed a commit that referenced this issue Sep 18, 2019
f1ames pushed a commit that referenced this issue Sep 18, 2019
@Dumluregn Dumluregn added the status:confirmed An issue confirmed by the development team. label Sep 18, 2019
@f1ames f1ames added this to the 4.13.0 milestone Sep 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser:chrome The issue can only be reproduced in the Chrome browser. browser:safari The issue can only be reproduced in the Safari browser. plugin:widgetselection The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:bug A bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants