Ticket #29235: 29235.patch
File 29235.patch, 2.5 KB (added by , 9 years ago) |
---|
-
src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js
549 549 } 550 550 551 551 if ( 'ontouchend' in document ) { 552 editor.on( 'touchend', edit );553 554 552 editor.on( 'click', function( event ) { 555 553 var target = event.target; 556 554 … … 563 561 event.stopPropagation(); 564 562 } 565 563 }); 566 } else {567 editor.on( 'mouseup', edit );568 564 } 569 565 566 editor.on( 'mouseup touchend', edit ); 567 570 568 editor.on( 'init', function() { 571 569 var dom = editor.dom, 572 570 captionClass = editor.getParam( 'wpeditimage_html5_captions' ) ? 'html5-captions' : 'html4-captions'; -
src/wp-includes/js/tinymce/plugins/wpview/plugin.js
11 11 toRemove = false, 12 12 firstFocus = true, 13 13 _noop = function() { return false; }, 14 is TouchDevice = ( 'ontouchend' in document ),14 isios = /iPad|iPod|iPhone/.test( navigator.userAgent ), 15 15 cursorInterval, lastKeyDownNode, setViewCursorTries, focus, execCommandView; 16 16 17 17 function getView( node ) { … … 141 141 dom.bind( selected, 'beforedeactivate focusin focusout', _stop ); 142 142 143 143 // select the hidden div 144 if ( is TouchDevice) {144 if ( isios ) { 145 145 editor.selection.select( clipboard ); 146 146 } else { 147 147 editor.selection.select( clipboard, true ); … … 298 298 }); 299 299 300 300 editor.on( 'mousedown mouseup click touchend', function( event ) { 301 var view = getView( event.target ), 302 type = isTouchDevice ? 'touchend' : 'mousedown'; 301 var view = getView( event.target ); 303 302 304 303 firstFocus = false; 305 304 … … 308 307 event.stopImmediatePropagation(); 309 308 event.preventDefault(); 310 309 311 if ( event.type === type&& ! event.metaKey && ! event.ctrlKey ) {310 if ( ( event.type === 'touchend' || event.type === 'mousedown' ) && ! event.metaKey && ! event.ctrlKey ) { 312 311 if ( editor.dom.hasClass( event.target, 'edit' ) ) { 313 312 wp.mce.views.edit( view ); 314 313 editor.focus(); … … 329 328 // Unfortunately, it also inhibits the dragging of views to a new location. 330 329 return false; 331 330 } else { 332 if ( event.type === type) {331 if ( event.type === 'touchend' || event.type === 'mousedown' ) { 333 332 deselect(); 334 333 } 335 334 }