Firefox add

前端 未结 7 1843
-上瘾入骨i
-上瘾入骨i 2021-01-02 21:38

EDIT: This isn\'t happening because of the ajax call. I changed it to use a value from a TinyMCE component for fun and I get the same thing.

content = tinyM         


        
7条回答
  •  無奈伤痛
    2021-01-02 21:54

    EDIT: Actually that just fixed the issue with that particular value... it started happening on other values where it used to be fine.

    Somehow this fixed the issue.

    Changed

    jQuery(selector).html(valueToDisplay)
    

    to

    jQuery(selector).html(
        function(index, oldHtml)  
        {
            return valueToDisplay;
        }
    );
    

    According to the doc, if I read it right it should be doing the same thing as I am not using oldHtml in the function. (http://api.jquery.com/html/).

    From the doc: "jQuery empties the element before calling the function; use the oldhtml argument to reference the previous content."

提交回复
热议问题