mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Merge "Quick fix for IE typing after generated content"
This commit is contained in:
commit
b47310238d
|
@ -288,7 +288,8 @@ ve.ce.Surface.prototype.onDocumentKeyDown = function ( e ) {
|
|||
selection = this.model.getSelection();
|
||||
if ( selection.start !== 0 && selection.isCollapsed() ) {
|
||||
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 ) );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue