﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
6415	"Style defined in stylecombo plugin with ""pre"" element ignores class property in Internet Explorer when applied without selecting text"	Nicolás Cardelino		"Steps to reproduce:[[BR]]
1. Define the following style:

{{{
CKEDITOR.config.stylesCombo_stylesSet = 'wiki_styles';

CKEDITOR.addStylesSet('wiki_styles',
[
    { name: 'Code', element: 'pre', attributes: { 'class': 'Code'} }
]);
}}}
2. From Internet Explorer, write a paragraph and place the cursor at the begining of the paragraph.[[BR]]
3. Select the style defined in step 1 from the styles combo (named ""Code"").[[BR]]
[[BR]]
After following these steps, the text entered in step 2 will be inside a pre element, but the class attribute won't be defined.[[BR]]
[[BR]]
CKEditor version: 3.4.1[[BR]]
Browser: Internet Explorer 8[[BR]]
OS: Ms Windows 7[[BR]]
[[BR]]
I debugged the code and found that the problem is in the ""toPre"" function located in ""_source\plugins\styles\plugin.js"". According to the comment, IE normalizes innerHtml to <pre>, breaking whitespaces, and to avoid that, a new <pre> element is created. The new <pre> lacks the original class attribute (and all other attributes) defined in the style definition.[[BR]]
[[BR]]
Thanks!"	Bug	confirmed	Normal		Core : Styles	3.4.1		IE	
