Opened 9 months ago

Last modified 9 months ago

#17040 new Bug

When using 'Find' functionality, text highlight styles are not removed after closing the Find dialogue

Reported by: Anup Owned by:
Priority: Normal Milestone:
Component: Core : Styles Version: 4.6.2
Keywords: Find Cc:


Steps to reproduce

  1. Launch ckeditor 4.6.2 in IE Compatibility Mode Mode. Please see test-oob-ckeditor.html file attached.
  2. Paste following content in editor line1 hi

line 2 hi bye line 3 hi

  1. Open Find dialogue and search for String hi.Keep on clicking "Find" button.
  2. Close the Find dialogue.

Expected result

The highlight styles added are removed.

Actual result

Highlighting is retained.

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

IE in compatibility mode CkEditor 4.6.2 Full Version

Attachments (3)

Scren Capture 1.PNG (49.9 KB) - added by Anup 9 months ago.
Before Closing Find Dialogue
Scren Capture 2.PNG (44.7 KB) - added by Anup 9 months ago.
After Closing Find Dialogue
test-oob-ckeditor.html (749 bytes) - added by Anup 9 months ago.

Download all attachments as: .zip

Change History (4)

Changed 9 months ago by Anup

Attachment: Scren Capture 1.PNG added

Before Closing Find Dialogue

Changed 9 months ago by Anup

Attachment: Scren Capture 2.PNG added

After Closing Find Dialogue

Changed 9 months ago by Anup

Attachment: test-oob-ckeditor.html added

comment:1 Changed 9 months ago by Anup

On further triage, I observed following-

  • In style.js removeFromElement() function, while executing following line

if ( this._.definition.fullMatch && element.getStyle( styleName ) != normalizeProperty( styleName, styles[ styleName ], true ) )


normalizeProperty() returns value as '#004' where as element.getStyle() returns '#000044'. This results in mismatch and styles are no removed.

  • Please note the following default configuration in Find plugin.js

CKEDITOR.config.find_highlight = { element: 'span', styles: { 'background-color': '#004', color: '#fff' } };

  • If we override the configuration using following, the issue does not occur. - CKEDITOR.replace( 'editor1',{find_highlight : { element: 'span', styles: { 'background-color': '#000044', color: '#fffffF' }}} );

So there is a workaround to the problem. However, I am not sure if this issue would affect other functionalities.

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