mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Quick fix for IE typing after generated content
The previous check was incorrect and was setting selection too often. Change-Id: I1ac393c149b6f814949b84e47faa04906c94f6af
This commit is contained in:
parent
1513c23be6
commit
de49bf2bf7
|
@ -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