﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
10153	Style combo update issue when inline editor programmatically created and focused	Jacob		"When programmatically creating an inline editor and giving it focus, the style combo doesn't reflect the selected style of the cursor. Worse, in Chrome, when you move the cursor/selection while in the same HTML element, the combo still doesn't update. It's not until you switch to a new element that the combo box starts updating.

May be easier to understand with this repro. Using the HTML/JS below, do the following in Chrome (I also attached a zip file):

1. Click the ""Start Editing"" button
2. Note that the cursor is on the H1, but the styles combo says ""Styles"" and not ""Heading 1.""
3. Click & highlight elsewhere within the H1.
4. Note that the styles combo still is stuck on ""Styles.""

I've been unable to find any workaround for this bug.


Repro HTML:

<html>
	<head>
		<script src=""ckeditor/ckeditor.js""></script>
        <script>
            function onEdit() {
                var div = document.getElementById('div');
                div.setAttribute('contenteditable', 'true');
                var editor = CKEDITOR.inline(div);
                div.focus();
            }
        </script>
	</head>
	<body>
        <div id=""div"" style=""margin-top: 300px"">
            <h1>Header</h1>
            <p>Lorum Ipsum etc. etc.</p>
        </div>
        <button onclick=""onEdit()"">Start Editing</button>
	</body>
</html>


Repro config.js:

CKEDITOR.editorConfig = function( config ) {
    config.toolbar = [
        {
            name: 'style',
            items: ['Styles']
        }
    ];
	
	config.stylesSet = [
		{
			name: 'Heading 1',
			element: 'h1'
		},
		{
			name: 'Paragraph',
			element: 'p'
		}
	];
};
"	Bug	confirmed	Normal		General	4.0 Beta		Opera Webkit	
