Fix timeout for the inline buttons on images in TinyMCE.

git-svn-id: https://develop.svn.wordpress.org/trunk@12115 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2009-10-27 09:06:26 +00:00
parent 5c564f80b5
commit 4a9acd62f8
9 changed files with 22 additions and 16 deletions
@@ -230,6 +230,11 @@
ed.onSaveContent.add(function(ed, o) {
ed.plugins.wordpress._hideButtons();
});
ed.onMouseDown.add(function(ed, e) {
if ( e.target.nodeName != 'IMG' )
ed.plugins.wordpress._hideButtons();
});
},
getInfo : function() {
@@ -276,18 +281,24 @@
'display' : 'block'
});
if ( this.mceTout )
clearTimeout(this.mceTout);
this.mceTout = setTimeout( function(){ed.plugins.wordpress._hideButtons();}, 5000 );
},
_hideButtons : function() {
if ( !this.mceTout )
return;
if ( document.getElementById('wp_editbtns') )
tinymce.DOM.hide('wp_editbtns');
if ( document.getElementById('wp_gallerybtns') )
tinymce.DOM.hide('wp_gallerybtns');
if ( this.mceTout )
clearTimeout(this.mceTout);
clearTimeout(this.mceTout);
this.mceTout = 0;
},
do_align : function(n, a) {
File diff suppressed because one or more lines are too long