Ticket #4736: 4736_2.patch
File 4736_2.patch, 2.4 KB (added by , 14 years ago) |
---|
-
_source/plugins/wysiwygarea/plugin.js
449 449 if ( keystrokeHandler ) 450 450 keystrokeHandler.attach( domDocument ); 451 451 452 // Cancel default action for backspace in IE on control types. (#4047)453 452 if ( CKEDITOR.env.ie ) 454 453 { 455 editor.on( 'key', function( event ) 454 // Cancel default action for backspace in IE on control types. (#4047) 455 domDocument.on( 'keydown', function( evt ) 456 456 { 457 if( editor.mode != 'wysiwyg' )458 return;459 460 457 // Backspace. 461 var control = ev ent.data.keyCode== 8458 var control = evt.data.getKeystroke() == 8 462 459 && editor.getSelection().getSelectedElement(); 463 460 if ( control ) 464 461 { … … 467 464 // Remove manually. 468 465 control.remove(); 469 466 editor.fire( 'saveSnapshot' ); 470 ev ent.cancel();467 evt.cancel(); 471 468 } 472 469 } ); 473 } 470 471 // PageUp/PageDown scrolling is broken in document 472 // with standard doctype, manually fix it. (#4736) 473 if( domDocument.$.compatMode == 'CSS1Compat' ) 474 { 475 var pageUpDownKeys = { 33 : 1, 34 : 1 }; 476 domDocument.on( 'keydown', function( evt ) 477 { 478 if( evt.data.getKeystroke() in pageUpDownKeys ) 479 { 480 setTimeout( function () 481 { 482 editor.getSelection().scrollIntoView(); 483 }, 0 ); 484 } 485 } ); 486 } 487 } 474 488 475 489 // Adds the document body as a context menu target. 476 490 if ( editor.contextMenu ) -
_source/plugins/selection/plugin.js
949 949 } 950 950 this.selectRanges( ranges ); 951 951 return this; 952 }, 953 954 // Moving scroll bar to the current selection's start position. 955 scrollIntoView : function() 956 { 957 // If we have split the block, adds a temporary span at the 958 // range position and scroll relatively to it. 959 var start = this.getStartElement(); 960 start.scrollIntoView(); 952 961 } 953 962 }; 954 963 })();