Merge "Quick fix for IE typing after generated content"

This commit is contained in:
jenkins-bot 2013-04-05 23:14:40 +00:00 committed by Gerrit Code Review
commit b47310238d

View file

@ -288,7 +288,8 @@ ve.ce.Surface.prototype.onDocumentKeyDown = function ( e ) {
selection = this.model.getSelection(); selection = this.model.getSelection();
if ( selection.start !== 0 && selection.isCollapsed() ) { if ( selection.start !== 0 && selection.isCollapsed() ) {
prevNode = this.model.getDocument().getDocumentNode().getNodeFromOffset( selection.start - 1 ); prevNode = this.model.getDocument().getDocumentNode().getNodeFromOffset( selection.start - 1 );
if ( !prevNode.canHaveChildren() && !prevNode.canContainContent() ) { // TODO: Check for generated content
if ( prevNode.type === 'MWimage' || prevNode.type === 'alienInline' ) {
this.model.change( null, new ve.Range( selection.start ) ); this.model.change( null, new ve.Range( selection.start ) );
} }
} }