Note that there are some explanatory texts on larger screens.

plurals
  1. POTinyMCE/CKeditor freezing container div's scrolling when initializing
    text
    copied!<p>I have TinyMCE initializing textareas that have been loaded via AJAX callback, in a colorbox modal window containing jQuery UI tabs panels. The panel that the textareas are being loaded into are scrollable (overflow-y:auto). However, it seems that when I initialize TinyMCE on these new textareas, it scrolls about halfway down to one of the lower textareas on the list, and initializes them correctly, but you can no longer scroll the container panel's div in Chrome. You can still scroll the panel's div in Firefox and IE, but not in Chrome. </p> <p>My AJAX call:</p> <pre><code>function getStuff(id){ $.ajax({ type: 'POST', url: '/ajax/get_stuff', data: {id: id}, beforeSend:function(){ $('#panel').html('Loading...'); }, success:function(resp){ $('#panel').html(resp); ckInit(); }, error:function(){} }); } </code></pre> <p>and the initialize function:</p> <pre><code>function ckInit(){ var config = { extraPlugins : 'autogrow', autoGrow_onStartup : true , removePlugins : 'resize' }; $("textarea.ck").each(function() { if (typeof(CKEDITOR.instances[this.id]) == 'undefined') { CKEDITOR.replace(this.id, config); } else { CKEDITOR.instances[this.id].destroy(true); CKEDITOR.replace(this.id, config); } }); } </code></pre> <p>If any other info would be helpful, please let me know. And, thanks in advance!</p> <p><strong>UPDATE</strong> I had a feeling Colorbox had something to do with it, so I tried loading the instances instead in the main window, to the same exact result. The container div is scrolled down an arbitrary amount, and the scrollbar freezes. Trying to move it up and down will not scroll. </p> <p>I tried replacing TinyMCE with CKeditor, and strangly, same exact problem. Which makes me feel like I'm initializing them wrong, or something...</p> <p>Any ideas?</p> <p><strong>UPDATE 4/28</strong> It seems that if I initialize the text areas individually, the scrollbar does not freeze. However, when I initialize the textareas based on the class selector, as shown in the example above, it does. </p> <p>Another weird behavior: If I click back and forth to select one of the editors and then another, and if I do this a few times, it unlocks the scroll bar. Somehow, the act of switching the current editor a few times frees it up.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload