Why do you need to re-initialize the editor this way?
The timeout is for a IE9 crash users reported. Might roll that fix back since I'm a bit allergic to timeouts.
2012-09-21 09:13:23
drumsibumsi
I too hate timeout solutions in javascripts. I dynamically create instances, move them around (swap), remove them, etc. In simple scenario I just need to swap two TinyMCEs. Since I cannot simply change parents of initialized TinyMCEs (they hang up), so (as suggested in many forums) I deactivate first, move around, re-initialize.
Now there is an inconsistence. If you put "hiding" on a Timeout, then, "showing" also should be put on a Timeout. At least that. But unfortunately even this solution is not acceptable for me, because it flickers like hell.
Comments
jlo
Not reproducible. Could you set up a fiddle to share?
drumsibumsi
http://fiddle.tinymce.com/Zfcaab
Try 3.5.7 version and then - 3.5.6. The older one works while the newest fails.
drumsibumsi
http://fiddle.tinymce.com/agcaab
-- And here you can see the flickering when clicking "TEST!!!". This I talked about in my first post. I used Firefox 15 for these examples.
drumsibumsi
The second example actually is here: http://fiddle.tinymce.com/agcaab/1
spocke
Why do you need to re-initialize the editor this way?
The timeout is for a IE9 crash users reported. Might roll that fix back since I'm a bit allergic to timeouts.
drumsibumsi
I too hate timeout solutions in javascripts. I dynamically create instances, move them around (swap), remove them, etc. In simple scenario I just need to swap two TinyMCEs. Since I cannot simply change parents of initialized TinyMCEs (they hang up), so (as suggested in many forums) I deactivate first, move around, re-initialize.
Now there is an inconsistence. If you put "hiding" on a Timeout, then, "showing" also should be put on a Timeout. At least that. But unfortunately even this solution is not acceptable for me, because it flickers like hell.
spocke
Rewrote the logic a bit so it doesn't hide the container on remove.
https://github.com/tinymce/tinymce/commit/a12d6859e81408b12c956c3504b1fe7ff35aabae
This bug is related to #4921
drumsibumsi
Thank you very much! That was fast and worked also!!!