Opened 4 years ago

Closed 3 years ago

#13389 closed Bug (fixed)

editor.getData() fails, when cursor is next to a HR tag

Reported by: wginolas Owned by: kkrzton
Priority: Normal Milestone: CKEditor 4.5.7
Component: General Version: 4.4.6
Keywords: Blink Cc:


  1. Configure a inline CKEditor with the Sourcedialog plugin enabled.
  2. Visit this editor with Chrome.
  3. Enter this content via the Sourcedialog plugin:
    <hr />
  4. Open the Sourcedialog right after you closed it.
  5. The dialog is empty and the following exception is thrown:
    Uncaught IndexSizeError: Failed to execute 'extend' on 'Selection': 1 is larger than the given node's length.
    moveNativeSelectionToBookmark @ selection.js:224
    afterData @ selection.js:895
    listenerFirer @ event.js:144 @ event.js:290 @ editor_basic.js:24 @ editor.js:880
    onShow @ sourcedialog.js:24
    listenerFirer @ event.js:144 @ event.js:290
    (anonymous function) @ plugin.js:878
    (anonymous function) @ tools.js:464

I do not fully understand, what is happening here, but the Souredialog plugin calls editor.getData() when the dialog is opened. This call fails.

Change History (8)

comment:1 Changed 4 years ago by Jakub Ś

Keywords: Blink added
Status: newconfirmed

Problem can be reproduced from CKEditor 4.4.6 in Blink browsers only.

Error is:Uncaught IndexSizeError: Failed to execute 'extend' on 'Selection': 1 is larger than the given node's length.
Line: 224
URI: core/selection.js
Code: sel.extend( bm[ 1 ].node, bm[ 1 ].offset );

comment:2 Changed 4 years ago by Artur Delura

There are three related issues: #13389 #13307 #13284

comment:3 Changed 4 years ago by Jonathan

Also related to issue #13513

comment:4 Changed 4 years ago by Marek Lewandowski

Milestone: CKEditor 4.5.7

comment:5 Changed 4 years ago by kkrzton

Owner: set to kkrzton
Status: confirmedassigned

comment:6 Changed 4 years ago by kkrzton

This issue is also related to #13816 which is reimplementation of Filling Character handling mechanism.

I switched to t/13816 and perform some tests for this particular issue. The #13816 fixes also this issue so if #13816 is planned to be released also in 4.5.7 milestone there is no need to do some additional fixes for this issue.

I will provide automatic tests to cover this issue.

comment:7 Changed 4 years ago by kkrzton

Status: assignedreview

Provided unit tests, changes in t/13389.

At the moment tests fails on Chrome. Test passes with #13816 (which fixes this issue) so this branch should be merged after #13816.

comment:8 Changed 3 years ago by Marek Lewandowski

Resolution: fixed
Status: reviewclosed

Fixed with git:2d078ff42a by #13816.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy