Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2015
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.19 KB | None | 0 0
  1. --- a/extensions/VisualEditor/lib/ve/src/ce/ve.ce.Surface.js
  2. +++ b/extensions/VisualEditor/lib/ve/src/ce/ve.ce.Surface.js
  3. @@ -148,7 +148,18 @@ ve.ce.Surface = function VeCeSurface( model, ui, options ) {
  4.         keydown: this.onDocumentKeyDown.bind( this ),
  5.         keyup: this.onDocumentKeyUp.bind( this ),
  6.         keypress: this.onDocumentKeyPress.bind( this ),
  7. -       input: this.onDocumentInput.bind( this )
  8. +       input: this.onDocumentInput.bind( this ),
  9. +       compositionstart: function() {
  10. +           var selection = this.model.getSelection();
  11. +           if ( selection instanceof ve.dm.TableSelection ) {
  12. +               var cellSelection = selection.collapseToFrom();
  13. +               var annotations = this.model.getDocument().data.getAnnotationsFromRange( cellSelection.getRanges()[0] );
  14. +               this.model.setSelection( cellSelection );
  15. +               this.handleTableDelete();
  16. +               this.documentView.getBranchNodeFromOffset( selection.tableRange.start + 1 ).setEditing( true );
  17. +               this.model.setInsertionAnnotations( annotations );
  18. +           }
  19. +       }.bind( this )
  20.     } ).after( {
  21.         keydown: this.afterDocumentKeyDown.bind( this )
  22.     } );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement