Opened 8 years ago

Last modified 8 years ago

#16738 closed Bug

Edge issue: script error on editor.applyStyle() "Unable to get property 'compare' of undefined or null reference" — at Initial Version

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

Description

Steps to reproduce

  1. 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'}

});

  1. In edge, when I call this method, an exception gets thrown

"Unable to get property 'compare' of undefined or null reference"

  1. 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 (0)

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