Catrope has uploaded a new change for review.
https://gerrit.wikimedia.org/r/70939
Change subject: Don't compute the end offset to pass to insertMeta()
......................................................................
Don't compute the end offset to pass to insertMeta()
Omitting the offset causes insertMeta() to automatically use the
end offset, so we don't need to compute it in two places. The two
computations were also slightly different.
Change-Id: I55543fdd113a6a986899c093733191df948acb2e
---
M modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js
1 file changed, 1 insertion(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor
refs/changes/39/70939/1
diff --git a/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js
b/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js
index 0a3188f..1b0ffeb 100644
--- a/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js
+++ b/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js
@@ -416,8 +416,7 @@
* @param {Object} metaBase meta list insert object
*/
ve.ui.MWMetaDialog.prototype.insertMetaListItem = function ( metaBase ) {
- var offset = this.surface.getModel().getDocument().getData().length;
- this.metaList.insertMeta( metaBase, offset );
+ this.metaList.insertMeta( metaBase );
};
/* Registration */
--
To view, visit https://gerrit.wikimedia.org/r/70939
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I55543fdd113a6a986899c093733191df948acb2e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits