Merge pull request #157 from shariquerik/keyboard-integration-fix
This commit is contained in:
commit
b4428639cb
@ -520,9 +520,12 @@ export default class CellManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
promise = valuePromise.then((value) => {
|
promise = valuePromise.then((value) => {
|
||||||
const done = editor.setValue(value, rowIndex, col);
|
|
||||||
const oldValue = this.getCell(colIndex, rowIndex).content;
|
const oldValue = this.getCell(colIndex, rowIndex).content;
|
||||||
|
|
||||||
|
if (oldValue === value) return false;
|
||||||
|
|
||||||
|
const done = editor.setValue(value, rowIndex, col);
|
||||||
|
|
||||||
// update cell immediately
|
// update cell immediately
|
||||||
this.updateCell(colIndex, rowIndex, value);
|
this.updateCell(colIndex, rowIndex, value);
|
||||||
$cell.focus();
|
$cell.focus();
|
||||||
@ -643,7 +646,7 @@ export default class CellManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
focusCellInDirection(direction) {
|
focusCellInDirection(direction) {
|
||||||
if (!this.$focusedCell) {
|
if (!this.$focusedCell || (this.$editingCell && ['left', 'right', 'up', 'down'].includes(direction))) {
|
||||||
return false;
|
return false;
|
||||||
} else if (this.$editingCell && ['tab', 'shift+tab'].includes(direction)) {
|
} else if (this.$editingCell && ['tab', 'shift+tab'].includes(direction)) {
|
||||||
this.deactivateEditing();
|
this.deactivateEditing();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user