Opened 8 years ago
Last modified 8 years 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: |
Description
Steps to reproduce
- Launch ckeditor 4.6.2 in IE Compatibility Mode Mode. Please see test-oob-ckeditor.html file attached.
- Paste following content in editor line1 hi
line 2 hi bye line 3 hi
- Open Find dialogue and search for String hi.Keep on clicking "Find" button.
- 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)
Change History (4)
Changed 8 years ago by
Attachment: | Scren Capture 1.PNG added |
---|
Changed 8 years ago by
Attachment: | test-oob-ckeditor.html added |
---|
comment:1 Changed 8 years ago by
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 ) )
continue;
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.
Before Closing Find Dialogue