Opened 8 years ago
Closed 8 years ago
#16738 closed Bug (expired)
Edge issue: script error on editor.applyStyle() "Unable to get property 'compare' of undefined or null reference"
Reported by: | zoarif | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 4.6.0 |
Keywords: | Cc: |
Description (last modified by )
Steps to reproduce
- I have custom style link in my editor that I try to apply using editor.applyStyle(style)and my style is:
const linkStyle: CKEDITOR.style = new CKEDITOR.style({ name: 'link', element: 'a', type: CKEDITOR.STYLE_INLINE, attributes: {'href': data, 'target': '_blank'} });
- In edge, when I call this method, an exception gets thrown
"Unable to get property 'compare' of undefined or null reference"
- I see that its coming from checkSelectionChange() method:
...
at this line
var currentPath = this.elementPath(); if ( !currentPath.compare( this._.selectionPreviousPath ) ) { ...
currentPath is undefined here, it tries to call compare and an exception gets thrown.
Expected result
Style should get applied.
Actual result
Error gets thrown 'Unable to get property 'compare' of undefined or null reference'
Other details (browser, OS, CKEditor version, installed plugins)
This bug is specific to Microsoft Edge 38.14393.0.0. Does not repro in IE and chrome.
Change History (3)
comment:1 Changed 8 years ago by
Status: | new → pending |
---|
comment:2 Changed 8 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 8 years ago by
Resolution: | → expired |
---|---|
Status: | pending → closed |
I tried to reproduce this error by creating a
CKEDITOR.style
instance as shown in the description and applying it also through the console(CKEDITOR.instances.someNamedInstance.applyStyle( linkStyle )
) but the error did not occur.Could you share some more details about the circumstances in which this bug occured(a list of steps to be done at http://ckeditor.com/ or a jsfiddle example would be perfect)?