Changeset 30257 for branches/4.0
- Timestamp:
- 11/06/2014 08:12:25 AM (11 years ago)
- Location:
- branches/4.0
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/js/tinymce/plugins/wpview/plugin.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.0
-
branches/4.0/src/wp-includes/js/tinymce/plugins/wpview/plugin.js
r29615 r30257 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.