Opened 8 years ago
Last modified 8 years ago
#14869 closed Bug
JS error thrown with Find and Divarea plugins used together. — at Version 4
Reported by: | Jakub Ś | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.6.2 |
Component: | General | Version: | 4.0 |
Keywords: | Support | Cc: |
Description (last modified by )
Steps to reproduce
- Open sample which contains Find and Divarea plugins (divrea sample in standard package).
- Type
New Paragraph added
- Open Find dialog and search for
New
- Close the dialog with close button.
Expected result
No error is thrown.
Actual result
JS error is thrown:
Message:
Firefox: IndexSizeError: Index or size is negative or greater than the allowed amount
Chrome: IndexSizeError: Failed to execute 'setStart' on 'Range': The offset 19 is larger than or equal to the node's length (3).
Line:1933
Path: ckeditor-dev/core/selection.js
Other details (browser, OS, CKEditor version, installed plugins)
Problem can be reproduced in all browsers.
Change History (4)
comment:1 Changed 8 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 8 years ago by
Keywords: | Support added |
---|
comment:3 Changed 8 years ago by
comment:4 Changed 8 years ago by
Description: | modified (diff) |
---|
Based on information from user who originally reported this ticket, I have debugged this issue. It seems the problem is
editor.focus();
inonHide
method in find.js file.When debuging code manually error is not thrown so a good workaround for this issue is warping
editor.focus()
inStill after calling
editor.getSelection().selectRanges( [ range ] );
start/end offsets show 0/1 (not 03). In order to fix offsets you need to calleditor.getSelection().getRanges()[0].moveToRange(range);
but you should rather not be doing that in a first place so this is another workaround just for offsets.