TinyMCE is glitchy/unusable in IE8

Posted by Force Flow on Stack Overflow See other posts from Stack Overflow or by Force Flow
Published on 2010-12-24T02:48:32Z Indexed on 2010/12/24 21:54 UTC
Read the original article Hit count: 258

I'm using the jQuery version of TinyMCE 3.3.9.3

In firefox, it works fine (10 sec video depicting it in use): http://www.youtube.com/watch?v=TrAE0igfT3I

In IE8 (in IE8 standards mode), I can't type or click any buttons. However, if I use ctrl+v to paste, then I can start typing, but the buttons still don't work (a 45 sec video depicting it in use): http://www.youtube.com/watch?v=iBSRlE8D8F4

The jQuery TinyMCE demo on TinyMCE's site works for me in IE8.

Here's the init code:

$().ready(function(){

    function tinymce_focus(){
        $('.defaultSkin table.mceLayout').css({'border-color' : '#6478D7'});
        $('.defaultSkin table.mceLayout tr.mceFirst td').css({'border-top-color' : '#6478D7'});
        $('.defaultSkin table.mceLayout tr.mceLast td').css({'border-bottom-color' : '#6478D7'});
    }

    function tinymce_blur(){
        $('.defaultSkin table.mceLayout').css({'border-color' : '#93a6e1'});
        $('.defaultSkin table.mceLayout tr.mceFirst td').css({'border-top-color' : '#93a6e1'});
        $('.defaultSkin table.mceLayout tr.mceLast td').css({'border-bottom-color' : '#93a6e1'});
    }


    $('textarea.tinymce').tinymce({
        script_url : 'JS/tinymce/tiny_mce.js',
        theme : "advanced",
        mode : "exact",
        invalid_elements : "b,i,iframe,font,input,textarea,select,button,form,fieldset,legend,script,noscript,object,embed,table,img,a,h1,h2,h3,h4,h5,h6",

        //theme options 
        theme_advanced_buttons1 : "cut,copy,paste,pastetext,pasteword,selectall,|,undo,redo,|,cleanup,removeformat,|", 
        theme_advanced_buttons2 : "bold,italic,underline,|,bullist,numlist,|,forecolor,backcolor,|", 
        theme_advanced_buttons3 : "", 
        theme_advanced_buttons4 : "", 
        theme_advanced_toolbar_location : "top", 
        theme_advanced_toolbar_align : "left", 
        theme_advanced_statusbar_location : "none", 
        theme_advanced_resizing : false,

        //plugins
        plugins : "inlinepopups,paste",
        dialog_type : "modal",
        paste_auto_cleanup_on_paste : true,

        setup: function(ed){
            ed.onInit.add(function(ed){

                //check for addEventListener -- primarily supported by firefox only
                var edDoc = ed.getDoc();
                if ("addEventListener" in edDoc){
                    edDoc.addEventListener("focus", function(){
                        tinymce_focus();
                    }, false);

                    edDoc.addEventListener("blur", function(){
                        tinymce_blur();
                    }, false);
                }

            });
        }

    });


});

Any ideas as to why it's not working in IE8?

[edit]: stripping everything out of the init (leaving just script_url and theme) results in the same symptoms

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about internet-explorer