Ticket #28595: 28595.14.patch
File 28595.14.patch, 1.2 KB (added by , 10 years ago) |
---|
-
src/wp-includes/js/tinymce/plugins/wpview/plugin.js
11 11 firstFocus = true, 12 12 cursorInterval, lastKeyDownNode, setViewCursorTries, focus; 13 13 14 function getView( node ) { 14 function getView( node, aClass ) { 15 var aClass = aClass || 'wpview-wrap'; 16 15 17 // Doing this directly is about 40% faster 16 18 while ( node && node.parentNode ) { 17 if ( node.className && (' ' + node.className + ' ').indexOf(' wpview-wrap') !== -1 ) {19 if ( node.className && (' ' + node.className + ' ').indexOf(' ' + aClass + ' ') !== -1 ) { 18 20 return node; 19 21 } 20 22 … … 623 625 }, 500 ); 624 626 // If the cursor lands anywhere else in the view, set the cursor before it. 625 627 // Only try this once to prevent a loop. (You never know.) 626 } else if ( className !== 'wpview-clipboard'&& ! setViewCursorTries ) {628 } else if ( ! getView( event.element, 'wpview-clipboard' ) && ! setViewCursorTries ) { 627 629 deselect(); 628 630 setViewCursorTries++; 629 631 setViewCursor( true, view );