Esanders has uploaded a new change for review.
https://gerrit.wikimedia.org/r/304585
Change subject: Ensure data isn't discarded when moving a row next to sparse
cells
......................................................................
Ensure data isn't discarded when moving a row next to sparse cells
Bug: T142879
Change-Id: Ib243825fe33704a07639b4289d7f4ceff052f7d7
---
M src/ui/actions/ve.ui.TableAction.js
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor
refs/changes/85/304585/1
diff --git a/src/ui/actions/ve.ui.TableAction.js
b/src/ui/actions/ve.ui.TableAction.js
index 4573b14..e29cad9 100644
--- a/src/ui/actions/ve.ui.TableAction.js
+++ b/src/ui/actions/ve.ui.TableAction.js
@@ -581,9 +581,10 @@
refCells = matrix.getColumn( refIndex ) || [];
}
- for ( i = 0, l = cells.length; i < l; i++ ) {
+ for ( i = 0, l = Math.max( cells.length, dataMatrixLine &&
dataMatrixLine.cells.length ); i < l; i++ ) {
cell = cells[ i ];
if ( !cell ) {
+ insertCells.push( dataMatrixLine.cells[ i ] );
continue;
}
refCell = refCells[ i ];
--
To view, visit https://gerrit.wikimedia.org/r/304585
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib243825fe33704a07639b4289d7f4ceff052f7d7
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits