mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Merge "Catching transactions that were not being committed."
This commit is contained in:
commit
19b95af9dd
|
@ -928,16 +928,16 @@ ve.ce.Surface.prototype.handleEnter = function ( e ) {
|
||||||
tx = ve.dm.Transaction.newFromInsertion(
|
tx = ve.dm.Transaction.newFromInsertion(
|
||||||
documentModel, list.getOuterRange().to, emptyParagraph
|
documentModel, list.getOuterRange().to, emptyParagraph
|
||||||
);
|
);
|
||||||
this.model.change( tx );
|
|
||||||
|
|
||||||
advanceCursor = false;
|
advanceCursor = false;
|
||||||
} else {
|
} else {
|
||||||
// We must process the transaction first because getRelativeContentOffset can't help us
|
// We must process the transaction first because getRelativeContentOffset can't help us
|
||||||
// yet
|
// yet
|
||||||
tx = ve.dm.Transaction.newFromInsertion( documentModel, selection.from, stack );
|
tx = ve.dm.Transaction.newFromInsertion( documentModel, selection.from, stack );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Commit the transaction
|
||||||
this.model.change( tx );
|
this.model.change( tx );
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Now we can move the cursor forward
|
// Now we can move the cursor forward
|
||||||
if ( advanceCursor ) {
|
if ( advanceCursor ) {
|
||||||
|
|
Loading…
Reference in a new issue