Ticket #46062: 46062.1.diff
File 46062.1.diff, 1.1 KB (added by , 6 years ago) |
---|
-
src/js/_enqueues/vendor/tinymce/plugins/wordpress/plugin.js
1064 1064 } 1065 1065 } 1066 1066 1067 // For full height editor. 1068 editor.on( 'resizewindow scrollwindow', hide ); 1069 // For scrollable editor. 1070 editor.dom.bind( editor.getWin(), 'resize scroll', hide ); 1067 editor.dom.bind( editor.getWin(), 'resize', hide ); 1071 1068 1069 if ( editor.inline ) { 1070 // Enable `capture` for the event. 1071 // This will hide/reposition the toolbar on any scrolling in the document. 1072 document.addEventListener( 'scroll', hide, true ); 1073 } else { 1074 editor.dom.bind( editor.getWin(), 'scroll', hide ); 1075 // For full height iframe editor. 1076 editor.on( 'resizewindow scrollwindow', hide ); 1077 } 1078 1072 1079 editor.on( 'remove', function() { 1080 document.removeEventListener( 'scroll', hide, true ); 1073 1081 editor.off( 'resizewindow scrollwindow', hide ); 1074 1082 editor.dom.unbind( editor.getWin(), 'resize scroll', hide ); 1075 1083 } );