Changeset 32818
- Timestamp:
- 06/17/2015 07:07:50 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js
r32816 r32818 447 447 var Factory = tinymce.ui.Factory, 448 448 settings = editor.settings, 449 currentToolbar,449 activeToolbar, 450 450 currentSelection, 451 451 wpAdminbar = document.getElementById( 'wpadminbar' ), … … 668 668 669 669 toolbar.on( 'show', function() { 670 currentToolbar = this;671 670 this.reposition(); 672 } );673 674 toolbar.on( 'hide', function() {675 currentToolbar = false;676 671 } ); 677 672 … … 704 699 var node; 705 700 706 if ( currentToolbar ) {707 node = currentToolbar.find( 'toolbar' )[0];701 if ( activeToolbar ) { 702 node = activeToolbar.find( 'toolbar' )[0]; 708 703 node && node.focus( true ); 709 704 } … … 723 718 currentSelection = args.selection || args.element; 724 719 725 currentToolbar && currentToolbar.hide(); 726 args.toolbar && args.toolbar.show(); 720 if ( activeToolbar ) { 721 activeToolbar.hide(); 722 } 723 724 if ( args.toolbar ) { 725 activeToolbar = args.toolbar; 726 activeToolbar.show(); 727 } else { 728 activeToolbar = false; 729 } 730 } ); 731 732 editor.on( 'focus', function() { 733 if ( activeToolbar ) { 734 activeToolbar.show(); 735 } 736 } ); 737 738 editor.on( 'hide', function() { 739 activeToolbar = false; 727 740 } ); 728 741
Note: See TracChangeset
for help on using the changeset viewer.