diff --git src/wp-admin/js/post.js src/wp-admin/js/post.js
index ff92c4b..d032839 100644
|
|
jQuery(document).ready( function($) { |
989 | 989 | update(); |
990 | 990 | } ); |
991 | 991 | } )( jQuery, new wp.utils.WordCounter() ); |
| 992 | |
| 993 | (function( $ ) { |
| 994 | |
| 995 | var $content = $( '#content' ), |
| 996 | contentEditor; |
| 997 | |
| 998 | $( document ).on( 'tinymce-editor-init', function( event, editor ) { |
| 999 | console.log(editor); |
| 1000 | if ( editor.id !== 'content' ) { |
| 1001 | return; |
| 1002 | } |
| 1003 | |
| 1004 | $('#post-body').on( 'keyup change', '#content, input, select, textarea', hideMessageBox ); |
| 1005 | editor.onKeyUp.add( hideMessageBox ); |
| 1006 | |
| 1007 | }); |
| 1008 | |
| 1009 | hideMessageBox = function() { |
| 1010 | var $message = $('#message.updated'); |
| 1011 | |
| 1012 | $message.animate({ |
| 1013 | opacity: 0 |
| 1014 | }, { |
| 1015 | complete: function() { |
| 1016 | $message.css( 'visibility', 'hidden' ); |
| 1017 | $message.attr( 'aria-hidden', 'true' ); |
| 1018 | } |
| 1019 | }); |
| 1020 | }; |
| 1021 | }( jQuery )); |