﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
11608	Selecting a style with attributes and then selecting a style with styles (but no attributes) retains the original attributes (and vice versa)	hel		"Assuming the presence of the following style rules:

{{{
{ name: 'CSS Style', element: 'span', attributes: { 'class': 'my_style' } },
{ name: 'Marker: Yellow', element: 'span', styles: { 'background-color': 'Yellow' } }
}}}

Switching between the above styles using the Styles drop-down appears to be retaining styles/attributes from the originally selected style. This also results in both styles being selected when the Styles drop-down list is displayed.

Looking at the source, this appears to be due to the following lines of code at line number 1355 within the core\style.js file:

{{{
// #6226: attributes should be copied before the new ones are applied
if ( element )
   element.copyAttributes( el );
}}}

This looks to have been introduced to preserve the BIDI language direction when applying block formats. See ticket #6226.
"	Bug	closed	Normal		Core : Styles	4.3.1	invalid		
