Opened 12 years ago
Last modified 12 years ago
#10215 confirmed Bug
Object Styles matching is perhaps to aggressive
Reported by: | Jakub Ś | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.2.1 |
Keywords: | Cc: |
Description
Problem can be reproduced from CKEditor 3.2.1 in both CKE 3.x and 4.x (v4).
To reproduce:
- Paste below code into source mode
<ul style="list-style-type:square;"> <li>one</li> <li>two <ul> <li>three</li> </ul> </li> </ul>
- Switch to wysiwyg and apply style for list (from styles dropdown) to outer list.
- Click on inner list and notice that list style is selected although inner list doesn't really have it.
I think the problem is checkActive method in core/styles.js which checks all elements from elements path for inline and object styles:
case CKEDITOR.STYLE_OBJECT: case CKEDITOR.STYLE_INLINE: var elements = elementPath.elements; for ( var i = 0, element; i < elements.length; i++ ) {...