Opened 8 years ago

Last modified 8 years ago

#14572 confirmed Bug

Drag & drop of anchor at edge of content to same location causes error

Reported by: Jin-Soo Jo Owned by:
Priority: Normal Milestone:
Component: General Version: 4.5.8
Keywords: Cc:

Description

You can see this on the current 4.5.8 demo @ http://ckeditor.com/demo . Tried on Chrome & Firefox.

  1. Sample content (source)

<a href="http://ckeditor.com/">link1</a> abc <a href="http://ckeditor.com/">link2</a>

  1. In WYSIWYG mode, drag & drop the link1 to the very beginning or link2 to the very end of the line.

The link disappears & there's an error in the console:

Uncaught TypeError: Cannot read property 'type' of null
window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.dom.range.setStart @ ckeditor.js:formatted:3729

which is at:

setStart: function(b, c) {
                b.type == CKEDITOR.NODE_ELEMENT && CKEDITOR.dtd.$empty[b.getName()] && (c = b.getIndex(),

Upstream of that, a has no parent node @ setStartAfter:

setStartAfter: function(a) {
                this.setStart(a.getParent(), a.getIndex() + 1)
            },

Change History (1)

comment:1 Changed 8 years ago by kkrzton

Status: newconfirmed

Tested in Chrome (49.0.2623.110 (64-bit)) with CKEditor 4.5.8 demo.

It throws error when link2 is dragged to the very end of the line or few lines below current text or link1 to the very beginning of or above the current text line.

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