Fix timeout for the inline buttons on images in TinyMCE.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -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
Reference in New Issue
Block a user