﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
13622	IE9 - CKEdtor is being disabled after save when using knockout js	Liran Fridman		"I don't actualy know how to elaborate on this bug, but here is how it goes:
I'm using CKEditor for multiple textareas on the same screen using knockout js ""foreach"".
The CKEditor is implemented along with knockout js like this:

    ko.bindingHandlers.CKEDITOR = {
        init: function (element, valueAccessor, allBindings, viewModel, bindingContext) {
            var ckEditorValue = valueAccessor();
            var id = $(element).attr('id');
            var allBindings = allBindings();
            var options = allBindings.EditorOptions;
            var visible = (typeof allBindings.visible == 'undefined' ? true : allBindings.visible);
            id = (typeof allBindings.id == 'undefined' ? id : allBindings.id);
    
            if (!visible || id == '') {
                $(element).hide();
                return;
            }
    
            $(element).attr('id', id).addClass(""orb-ckeditor"");
    
            var ignoreChanges = false;
    
            var defaultConfig = {};
            defaultConfig.toolbar = [
    		                            [""Undo"", ""Redo""],
                                        [""Bold"", ""Italic"", ""Underline"", ""Strike"", ""RemoveFormat"", ""-"", ""TextColor""],
                                        [""NumberedList"", ""BulletedList"", ""Outdent"", ""Indent""],
                                        [""JustifyLeft"", ""JustifyCenter"", ""JustifyRight"", ""JustifyBlock""],
                                        [""Link"", ""Unlink""]
    	                            ];
            defaultConfig.defaultLanguage = 'en';
            defaultConfig.removePlugins = 'resize, wordcount, elementspath, magicline';
            defaultConfig.enterMode = CKEDITOR.ENTER_BR;
    
            defaultConfig.on = {
                change: function () {
                    ignoreChanges = true;
                    ckEditorValue(instance.getData());
                    ignoreChanges = false;
                }
            };
            $.extend(defaultConfig, options);
            var instance = CKEDITOR.replace(id, defaultConfig);
    
            instance.setData(ckEditorValue());
    
            ckEditorValue.subscribe(function (newValue) {
                if (!ignoreChanges) {
                    instance.setData(newValue);
                }
            });
        }
    };

And here is the HTML:

    <div class=""quiz-settings"" data-bind=""foreach: items"">
    	<textarea data-bind=""CKEDITOR: PropertyObjectValue, visible: (PropertyType == 'MULTILINES' || PropertyType == 'EMAIL'), id: 'txtProp' + PropertyID""></textarea>
    </div>

I'm saving the data using AJAX call and on the `success` method I'm re-binding the data to the editors.
It works fine in Chrome '''but in IE9 the editor is disabled after the save action when I click inside the editor to edit''' but when I click on the editors menu buttons such as the **Bold** or **Underline** it becomes active again

I have no idea why this happens or how to fix it..."	Bug	closed	Normal		General	4.4.7	invalid		
