I have a tinyMCE textarea, in div named text_editor.
So i have in my jQuery:
$('#text_editor').hover(function(){
mouse_is_inside=true;
}, function(){
mouse_is_inside=false;
});
$('body').mouseup(function(){
if(! mouse_is_inside){
$('#text_editor').hide();
}
});
with this when the user click outside the div text editor, this will hide, but if the user select a font family or a font size, the text editor hide, so i add this in my jQuery:
$(document).on('click', '.mceMenuItem, .mceColorSplitMenu, .mceBottom, .mceMoreColors', function(e){
e.stopPropagation();
$('#text_editor').show();
});
this resolve the problem overhead. but if the users click in the colorpicker-more colors, a new window open, and text_editor hide, and i don’t want that.
demo