Changeset 29738
- Timestamp:
- 09/12/2014 01:20:09 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/js/editor-expand.js (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/editor-expand.js
r29698 r29738 3 3 window.wp = window.wp || {}; 4 4 5 jQuery( document ).ready( function( $) {5 jQuery( document ).ready( function( $ ) { 6 6 var $window = $( window ), 7 7 $document = $( document ), … … 149 149 // We need to wait for TinyMCE to initialize. 150 150 $document.on( 'tinymce-editor-init.editor-expand', function( event, editor ) { 151 var hideFloatPanels = _.debounce( function() { 152 ! $( '.mce-floatpanel:hover' ).length && tinymce.ui.FloatPanel.hideAll(); 153 $( '.mce-tooltip' ).hide(); 154 }, 1000, true ); 155 151 156 // Make sure it's the main editor. 152 157 if ( editor.id !== 'content' ) { … … 225 230 // Adjust when switching editor modes. 226 231 function mceShow() { 232 $window.on( 'scroll.mce-float-panels', hideFloatPanels ); 233 227 234 setTimeout( function() { 228 235 editor.execCommand( 'wpAutoResize' ); … … 232 239 233 240 function mceHide() { 241 $window.off( 'scroll.mce-float-panels' ); 242 234 243 setTimeout( function() { 235 244 var top = $contentWrap.offset().top; … … 252 261 // Adjust when the editor resizes. 253 262 editor.on( 'setcontent wp-autoresize wp-toolbar-toggle', adjust ); 263 264 $window.off( 'scroll.mce-float-panels' ).on( 'scroll.mce-float-panels', hideFloatPanels ); 254 265 }; 255 266 … … 259 270 editor.off( 'hide', mceHide ); 260 271 editor.off( 'setcontent wp-autoresize wp-toolbar-toggle', adjust ); 272 273 $window.off( 'scroll.mce-float-panels' ); 261 274 }; 262 275
Note: See TracChangeset
for help on using the changeset viewer.