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

Multiple editor instances + setData causing errors, blank CKEditors #879

Closed
samjhill opened this issue Sep 7, 2017 · 2 comments
Closed
Labels
resolution:expired Issue reporter did not provide enough information to reproduce the issue for at least 2 weeks.

Comments

@samjhill
Copy link

samjhill commented Sep 7, 2017

Are you reporting a feature request or a bug?

Bug

We are using https://github.com/jdorn/json-editor to render JSON structures into forms, but substituted CKEditor for WYSIWYG content.

Provide detailed reproduction steps (if any)

  1. Have multiple CKEditors on one page
  2. click moveUp/moveDown button in json-editor
    image

Expected result

Text inside CKEditors is swapped to correct position per the move up/move down instructions

Actual result

All CKEditor instances become blank and unresponsive. Upon clicking again, I get this error message:

ckeditor.js?ver=1504794180601448:399 Uncaught TypeError: Cannot read property 'getSelection' of undefined
    at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.dom.selection.getNative (ckeditor.js?ver=1504794180601448:399)
    at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.dom.selection (ckeditor.js?ver=1504794180601448:397)
    at a.window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.editor.getSelection (ckeditor.js?ver=1504794180601448:395)
    at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.plugins.undo.Image (ckeditor.js?ver=1504794180601448:1143)
    at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.plugins.undo.UndoManager.save (ckeditor.js?ver=1504794180601448:1138)
    at a.<anonymous> (ckeditor.js?ver=1504794180601448:1134)
    at a.d (ckeditor.js?ver=1504794180601448:10)
    at a.window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.event.CKEDITOR.event.fire (ckeditor.js?ver=1504794180601448:11)
    at a.window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.editor.CKEDITOR.editor.fire (ckeditor.js?ver=1504794180601448:13)
    at a.setData (ckeditor.js?ver=1504794180601448:241)

Other details

When I prevent CKEditor from rendering, and instead allow json-editor to use a plain textarea, moving them around works fine.

  • Browser: Chrome
  • OS: mac OS Sierra
  • CKEditor version: 4.5.11, also tried 4.7.1
  • Installed CKEditor plugins:
    image
@msamsel
Copy link
Contributor

msamsel commented Sep 11, 2017

Hi,

situation seems to be similar to problem described here or here #667. And I think your problem also is caused by the same reason.
If it's not, then please prepare some simplified example where problem will be possible to analyse (The best would be some page like: codepen.io, jsfiddle.net, etc.).

@mlewand
Copy link
Contributor

mlewand commented Sep 25, 2017

Hi, It's been a while since we last heard from you. We're closing this issue for now. Still, feel free provide us requested feedback, so that we can reopen this issue.

@mlewand mlewand closed this as completed Sep 25, 2017
@mlewand mlewand added resolution:expired Issue reporter did not provide enough information to reproduce the issue for at least 2 weeks. and removed status:pending labels Sep 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution:expired Issue reporter did not provide enough information to reproduce the issue for at least 2 weeks.
Projects
None yet
Development

No branches or pull requests

3 participants