Initial loading and selectCell problem

Tags: #<Tag:0x00007f8b1cc4b4a0>

Dear Sirs,
I got a problem with hands on table ver . 6.0.1

When I load initially data I do the following:
afterInit: function () {

                this.selectCell(0, 0, 0, 0);
                
            }

The cell focused has the following editor:
var sheetlyEditor = Handsontable.editors.TextEditor.prototype.extend();

sheetlyEditor.prototype.beginEditing = function (arg, event) {
    var val = this.originalValue.value;
    self.inEditor = true;
    if (event) {
        if (event.key && event.key !== 'F2' && event.key !== 'Enter' && event.key !== 'Dead') {
            val = '';
        }
    }
    Handsontable.editors.TextEditor.prototype.beginEditing.apply(this, [val]);
};

sheetlyEditor.prototype.saveValue = function (val) {
    if (!self.inEditor)
        return;
    var _self = this;

    if (_self.originalValue.value === val[0][0]) {
        return;
    }

    var row = this.row;
    var col = this.col;
    var cellData = CloneObject(_self.originalValue);
    var beforeCellData = CloneObject(_self.originalValue);
    self.inEditor = false;
    cellData.value = val[0][0];
    self.AddToHistory([beforeCellData], [cellData]);
    _self.instance.setDataAtCell(row, col, cellData, "edit");
    //_self.cellProperties.readOnly = true;
    //_self.instance.render();
    self.RemoveRedoOption();
    self.SendUpdate([cellData]);
};


when I press an arrow key on the keyboard the data in the cell is deleted. I noticed that saveValue = function (val) receives an empty string.

What am I doing wrong?

Hi @alexander1

Can you share a demo and a issue description (steps to replicate, other odd behavior). It will be easier to debug.

I cannot share demo, but when the data is loaded the cell on coords 0,1 is focused. when I press a keyboard arrow the content is deleted

Can you feel this demo then? https://jsfiddle.net/xq7j8kez/ it lacks some logic. Then I will be able to test it and help you solve the issue.