Opened 9 years ago

Closed 8 years ago

#13591 closed Bug (invalid)

Dragging broken on inline widget

Reported by: meyeet Owned by:
Priority: Normal Milestone:
Component: General Version: 4.5.1
Keywords: Cc:

Description

The following bug was found to affect both a custom widget and the sample widget given in CKEditor documentation. The CKEditor sample widget "simplebox" and an inline version of "simplebox" are included in the attached files.

Steps to reproduce:

  1. Open attached sample html page in either of the two test folders.
  2. Click inside CKEditor's standard configuration, or the inline version underneath.
  3. Click the icon to add an inline sample widget (button is labeled "2").
  4. Attempt to drag and drop the resultant simplebox widget somewhere in the document.

Result: Widget is broken, and both pieces of the previously read-only widget can now be dragged and edited independently of one another.

Browser name: Internet Explorer 11 (v. 11.0.21) OS: Microsoft Windows 7 SP1

Editor configuration: Affects both inline and standard configurations of CKEditor 4.5.1 and CKEditor nightly build 7/29/2015.

All test cases in attached .zip folder.

Potentially relevant files:

simplewebpage.html (demo page used in test)

ckeditor/config.js (altered from standard)

ckeditor/plugins/simplebox/* (added from tutorial found at http://docs.ckeditor.com/#!/guide/widget_sdk_tutorial_1)

ckeditor/plugins/simpleboxinline/* (added and edited from tutorial found at http://docs.ckeditor.com/#!/guide/widget_sdk_tutorial_1)

ckeditor/plugins/widget/* (src: http://ckeditor.com/addons/plugins/)

ckeditor/plugins/lineutils/* (src: http://ckeditor.com/addons/plugins/)

ckeditor/plugins/clipboard/* (src: http://ckeditor.com/addons/plugins/)

Attachments (1)

ckeditortestcases.zip (2.7 MB) - added by meyeet 9 years ago.
Zip file containing test cases

Change History (2)

Changed 9 years ago by meyeet

Attachment: ckeditortestcases.zip added

Zip file containing test cases

comment:1 Changed 8 years ago by Jakub Ś

Resolution: invalid
Status: newclosed

From what I have checked when you insert such simple widget and then try to switch to source you get an error. The debug in widget plugin in forEach shows as follows p, div with two children, h2, wrapper span with one child text and parent h2 (what???). At that stage error is thrown.

This is correct and this is in fact the only valid combination of tags that can be used here - span inside h2 and span inside p.
You can't have block-level template in your widget and mark it as inline. That way you will have block-level elements wrapped in span. Since this is invalid HTML, CKEditor will try to fix it by breaking your invalid HTML and breaking the widget.
If you want to use inline widget, you need to have inline template for it.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy