Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nik 1593 posts 7151 karma points MVP 6x c-trib
    Nov 16, 2015 @ 11:32
    Nik
    0

    The Grid + Tiny MCE - AutoResize Error

    Hey guys/gals,

    So here I am again, yet another issue I could do with some wider advice on. I had a bit of a discussion with a few people about this at the Umbraco UK Festival last month and have finally started to look at it again.

    The issue is that under some situations TinyMCE goes nuts. Yep, that's pretty broad and doesn't help. So here's a bit more info.

    We have a document type with various properties, some of which are RTE's. In addition to the RTE's there is a grid, and as we all know the grid has RTE editors as well.

    Now what is happening is my editor page is growing to an obscene size. NOTE: This only effects the back end.

    Out of my discussions with people at the fest/hackathon it was suggested to try upgrading Tiny MCE.. I've done this and still have the same issue.

    On one of my pages, there is a total of 17 RTE's in play within the grid. This page is exhibiting these strange symptoms and today I've unminified the main TinyMCE Js file and the AutoSize plugin Js file. A bit of logging here and there and I can see that for a single RTE the setStyle method within the TinyMCE JS file is being called 395 times on page load.

    Here is a snippet of a debug log I generated:

    No is the number of the call, basically just a count value. Style is the style property being changed.

    No, Style, Value

    1, height, 184px

    2, height, 288px

    3, height, 8872px

    4, height, 1264px

    5, height, 10746px

    6, height, 3870px

    7, height, 1300px

    8, height, 10656px

    9, height, 2792px

    So a few questions now:

    1) Have other people had this situation? 2) Has anyone found the problem and solved it? 3) Anyone got any ideas of where I might need to look as I'm at a bit of a block trying to trace back all the calls.

  • Nik 1593 posts 7151 karma points MVP 6x c-trib
    Nov 16, 2015 @ 12:11
    Nik
    0

    Possible progress has been made,

    I don't know if it is the cause, or how it impacts things but......

    The iframe that tinyMCE renders it's control in seems to have the same ID for more than one entry on the page.


    Nope, that theory was wrong some times.....

    Sometimes tinyMCE seems to give all iFrames the same ID and other times it doesnt.

    Having looked in the tinyMCE souce I've got a bit closer.. but not near any form of solution.

    In the tinyMCE unminified tinymce.js file on lines 31723 and 31725 the following two lines exist respectively:

    self.fire('init');
    self.nodeChanged({initial: true});
    

    If these are commented out the issue doesn't occur, but at the same time no initial resizing for contents occurs.

  • Nik 1593 posts 7151 karma points MVP 6x c-trib
    Dec 23, 2015 @ 10:11
    Nik
    102

    Hi All,

    For anyone that comes across this I found the issue. It wasn't Umbraco, it wasn't TinyMce it was simply CSS.

    There was a CSS class that was being brought in via the main site style sheet that had height 100% on it. This fed down to the RTE's and boom, mahoosive growth.

    Take this style sheet off of the RTE / grid and look normal behaviour returns!

Please Sign in or register to post replies

Write your reply to:

Draft