Changeset 29766
- Timestamp:
- 09/26/2014 12:20:28 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/tinymce/plugins/wpview/plugin.js
r29615 r29766 13 13 _noop = function() { return false; }, 14 14 isios = /iPad|iPod|iPhone/.test( navigator.userAgent ), 15 cursorInterval, lastKeyDownNode, setViewCursorTries, focus, execCommandView ;15 cursorInterval, lastKeyDownNode, setViewCursorTries, focus, execCommandView, execCommandBefore; 16 16 17 17 function getView( node ) { … … 369 369 function isSpecialKey( key ) { 370 370 return ( ( key <= 47 && key !== VK.SPACEBAR && key !== VK.ENTER && key !== VK.DELETE && key !== VK.BACKSPACE && ( key < 37 || key > 40 ) ) || 371 key >= 224 || // OEM or non-printable 371 key >= 224 || // OEM or non-printable 372 372 ( key >= 144 && key <= 150 ) || // Num Lock, Scroll Lock, OEM 373 373 ( key >= 91 && key <= 93 ) || // Windows keys … … 650 650 view; 651 651 652 if ( node && ( node.className === 'wpview-selection-before'|| node.className === 'wpview-selection-after' ) && ( view = getView( node ) ) ) {653 handleEnter( view );652 if ( node && ( ( execCommandBefore = node.className === 'wpview-selection-before' ) || node.className === 'wpview-selection-after' ) && ( view = getView( node ) ) ) { 653 handleEnter( view, execCommandBefore ); 654 654 execCommandView = view; 655 655 } … … 666 666 667 667 if ( execCommandView ) { 668 node = execCommandView .nextSibling;668 node = execCommandView[ execCommandBefore ? 'previousSibling' : 'nextSibling' ]; 669 669 670 670 if ( node && node.nodeName === 'P' && editor.dom.isEmpty( node ) ) { 671 671 editor.dom.remove( node ); 672 setViewCursor( false, execCommandView );672 setViewCursor( execCommandBefore, execCommandView ); 673 673 } 674 674
Note: See TracChangeset
for help on using the changeset viewer.