Opened 4 years ago

Closed 3 years ago

#13958 closed Bug (expired)

Selection ranges sometimes calculates out of bounds indexes.

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

Description

Steps to reproduce

  1. Make selections in ckeditor rapidly.

Expected result

No console messages

Actual result

Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36 Error: Failed to execute setStart on Range: The offset 19 is larger than or equal to the nodes length (18).

at Error (native) at Object.CKEDITOR.dom.selection.selectRanges (https://aus.casewarecloud.com/wwa/e/v/880c8c5a/external/ng-ckeditor/libs/ckeditor/ckeditor.js:431:324) at Object.CKEDITOR.dom.selection.unlock (https://aus.casewarecloud.com/wwa/e/v/880c8c5a/external/ng

Other details (browser, OS, CKEditor version, installed plugins)

Error is traced back to this line on github: https://github.com/ckeditor/ckeditor-dev/blob/3b32b2564d545c42a718bb43a9d3de9bd31ec0a0/core/selection.js#L1918

It appears it is possible to get a larger offset for range.startOffset then is available on the nativeRange.

The impact to the user is minimal as the user has not complained that this results in any noticeable impact.

Change History (2)

comment:1 Changed 4 years ago by Jakub Ś

Keywords: crash warning bug removed
Status: newpending
Version: 4.5.6 (GitHub - master)

I have been trying to reproduce this issue in Safari nad Chrome but didn't manage to. Can this problem be reproduced in CKEditor demo or default standaone CKEditor, not integrated into your application?

If you can, could you post reproduction scenario as well as the screen cast for this problem.

comment:2 Changed 3 years ago by Jakub Ś

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