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

Unable to add new content when Collapsibleltem title is empty #1

Open
adriano66 opened this issue Jun 1, 2017 · 2 comments
Open

Unable to add new content when Collapsibleltem title is empty #1

adriano66 opened this issue Jun 1, 2017 · 2 comments

Comments

@adriano66
Copy link
Contributor

adriano66 commented Jun 1, 2017

CKEditor is "crashing" when you load content with Collapsibleltem markup with empty title.

I know this is some edge case and not an intended way of using the plugin but we might add some simple fix to prevent the editor from being unusable.

eg. You've added new Collapsibleltem with empty title and saved it into DB, after you load such content into editor most of the buttons will gray out due to JS error - "a is undefined" as title link will not be saved.

obraz

@pkerspe
Copy link
Owner

pkerspe commented Jun 1, 2017

Hi Adriano,

thanks for the report. Can you please provide Details on the Borwser (Make and Version) and OS you use?

Thanks a lot

@adriano66
Copy link
Contributor Author

WIN10, Firefox 53.0.3 (32-bit)
WIN7, Chrome 58.0.3029.110 (64-bit)

But it shouldn't matter as error is caused by non existing node and occurs while trying to attach attributes to empty node.
https://github.com/pkerspe/ckeditor-bootstrap-collapsibleItem/blob/master/plugin.js#L73

I just found the easiest way to reproduce the bug.

  • Add new collapsible element
  • Remove all characters from title
  • Switch to source
  • Switch back to WYSIWYG

I was using this build http://ckeditor.com/builder/76330dc789253a1b6b9955786dbe3379

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants