From ebe2afc2e383f18e8b782dbc1772fccbfbfe6711 Mon Sep 17 00:00:00 2001 From: ajugo Date: Wed, 31 Jan 2024 11:10:58 +0100 Subject: [PATCH] Fix duplication more than one cell at once for handsontables [SCI-9958] (#7010) --- vendor/assets/javascripts/handsontable.formula.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vendor/assets/javascripts/handsontable.formula.js b/vendor/assets/javascripts/handsontable.formula.js index f41768007..338097040 100644 --- a/vendor/assets/javascripts/handsontable.formula.js +++ b/vendor/assets/javascripts/handsontable.formula.js @@ -199,12 +199,12 @@ var beforeAutofillInsidePopulate = function(index, direction, data, deltas, iterators, selected) { var instance = this; - var r = index.row, - c = index.col, + var rlength = data.length, // rows + clength = data[0].length, //cols + r = index.row % rlength, + c = index.col % clength, value = data[r][c], - delta = 0, - rlength = data.length, // rows - clength = data ? data[0].length : 0; //cols + delta = 0; if (value[0] === '=') { // formula