javascripttinymcemcustomscrollbar

TinyMCE editor prevents bubbling of scroll events


I'm using TinyMCE inside a container that has custom scrollbar (by mCustomScrollbar) but when I try to scroll over an editor, the scrolling stucks.

Here is a fiddle demonstrating it (try to scroll it using a mouse wheel): https://jsfiddle.net/moaLsfnv/

tinymce.init({ selector: ".mytextarea" });
$('#container1').mCustomScrollbar({ theme:"dark-3" });

Is there any way to make editors bubble all the scroll events?


Solution

  • This isn't an editor thing, it's an iframe thing. Here's a replication case that doesn't load TinyMCE:

    https://jsfiddle.net/1gw82qkb/

    If you want to avoid editing content in an editor, try inline: true mode (although that means using divs instead of textareas):

    https://jsfiddle.net/saw5hdmL/

    That breaks in different ways, however, because tinymce depends on window scroll events to make the toolbar follow the editor as it moves. But it does show what I mean that scrolling works when you aren't using iframes.