Opened 8 years ago

Closed 7 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 Tade0)

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: = new{
    	name: 'link',
    	element: 'a',
    	attributes: {'href': data, 'target': '_blank'}
  2. 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 ( ! 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 Tade0

Status: newpending

I tried to reproduce this error by creating a 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 or a jsfiddle example would be perfect)?

comment:2 Changed 8 years ago by Tade0

Description: modified (diff)

comment:3 Changed 7 years ago by Marek Lewandowski

Resolution: expired
Status: pendingclosed
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