Ticket #30938: 30938.patch
| File 30938.patch, 1.4 KB (added by , 11 years ago) |
|---|
-
src/wp-includes/js/tinymce/plugins/wpview/plugin.js
162 162 toolbar = editor.$( viewNode ).find( '.toolbar' ), 163 163 editorToolbar = tinymce.$( editor.editorContainer ).find( '.mce-toolbar-grp' )[0], 164 164 editorToolbarBottom = ( editorToolbar && editorToolbar.getBoundingClientRect().bottom ) || 0; 165 165 166 166 if ( toolbar.length && editor.iframeElement ) { 167 167 // 48 = 43 for the toolbar + 5 buffer 168 168 delta = viewNode.getBoundingClientRect().top + editor.iframeElement.getBoundingClientRect().top - editorToolbarBottom - 48; … … 264 264 } else if ( y > lastRect.bottom && ( view = getView( last ) ) ) { 265 265 setViewCursor( false, view ); 266 266 event.preventDefault(); 267 } else {267 } else if ( x < bodyRect.left || x > bodyRect.right ) { 268 268 tinymce.each( editor.dom.select( '.wpview-wrap' ), function( view ) { 269 269 var rect = view.getBoundingClientRect(); 270 270 271 if ( y < rect.top ) { 272 return false; 273 } 274 271 275 if ( y >= rect.top && y <= rect.bottom ) { 272 276 if ( x < bodyRect.left ) { 273 277 setViewCursor( true, view ); … … 276 280 setViewCursor( false, view ); 277 281 event.preventDefault(); 278 282 } 279 return; 283 284 return false; 280 285 } 281 286 }); 282 287 }