Skip to content

Commit

Permalink
Merge pull request #157 from shariquerik/keyboard-integration-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shariquerik authored Jun 8, 2022
2 parents fea45f4 + d6a6c16 commit b442863
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/cellmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -520,9 +520,12 @@ export default class CellManager {
}

promise = valuePromise.then((value) => {
const done = editor.setValue(value, rowIndex, col);
const oldValue = this.getCell(colIndex, rowIndex).content;

if (oldValue === value) return false;

const done = editor.setValue(value, rowIndex, col);

// update cell immediately
this.updateCell(colIndex, rowIndex, value);
$cell.focus();
Expand Down Expand Up @@ -643,7 +646,7 @@ export default class CellManager {
}

focusCellInDirection(direction) {
if (!this.$focusedCell) {
if (!this.$focusedCell || (this.$editingCell && ['left', 'right', 'up', 'down'].includes(direction))) {
return false;
} else if (this.$editingCell && ['tab', 'shift+tab'].includes(direction)) {
this.deactivateEditing();
Expand Down

0 comments on commit b442863

Please sign in to comment.