material-design-lite: mdl-js-layout conflicts with TinyMCE

Hello,

It seems that something in mdl-js-layout conflicts with TinyMCE.

When that class is applied to the body tag, TinyMCE cannot open its menus anymore. In some other cases, you may also end up with non-editable text areas, but I have not been able to reproduce that bug on its own so I’ll check later if this one gets fixed.

Tested with MDL 1.0.5 and MDL 1.0.6.

A JSFiddle is available here: https://jsfiddle.net/2zrcf0uf/1/ . Try clicking the File, Edit, View, Format and Formats menu. It fails with Chrome 43 and Firefox 41 at least.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 19 (5 by maintainers)

Commits related to this issue

Most upvoted comments

You could try the solution described in #1369 .

Here’s a excerpt:

document.addEventListener('mdl-componentupgraded', function(e) {
    //In case other element are upgraded before the layout  
    if (typeof e.target.MaterialLayout !== 'undefined') {
        tinymce.init({
            selector: "textarea.richtext"
        });
    }
});