Merge "Disable Table Editing"

This commit is contained in:
Catrope 2012-11-15 01:22:00 +00:00 committed by Gerrit Code Review
commit 918c0e3266
2 changed files with 6 additions and 4 deletions

View file

@ -66,10 +66,6 @@ ve.ce.Surface = function VeCeSurface( $container, model, surface ) {
}, this ) );
// Initialization
try {
document.execCommand( 'enableObjectResizing', false, false );
document.execCommand( 'enableInlineTableEditing', false, false );
} catch ( e ) { /* Silently ignore */ }
rangy.init();
ve.ce.Surface.clearLocalStorage();
this.$.append( this.documentView.getDocumentNode().$ );

View file

@ -43,6 +43,12 @@ ve.Surface = function VeSurface( parent, dom, options ) {
this.setupCommands();
ve.instances.push( this );
this.model.startHistoryTracking();
// Turn off native object editing. This must be tried after the surface has been added to DOM.
try {
document.execCommand( 'enableObjectResizing', false, false );
document.execCommand( 'enableInlineTableEditing', false, false );
} catch ( e ) { /* Silently ignore */ }
};
/* Static Members */