Remove old 'Escape' event
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Peter Stuifzand 2020-11-11 19:49:04 +01:00
parent 8024dce1b0
commit 37a8482a87
2 changed files with 1 additions and 13 deletions

View File

@ -490,21 +490,9 @@ function editor(root, inputData, options) {
trigger('change') trigger('change')
// disableDragging(drake)
// render(root, store);
// drake = enableDragging(root)
return false return false
}); });
$(root).on('keydown', '.input-line', function (event) {
if (event.key === 'Escape') {
stopEditing(root, store, $(this))
return false
}
return true
});
function moveCursor(event, dir) { function moveCursor(event, dir) {
let target = event.target; let target = event.target;

View File

@ -199,7 +199,7 @@ function Store(inputData) {
let index = _.findIndex(idList, (id) => id === currentId) let index = _.findIndex(idList, (id) => id === currentId)
let oldValue = _.clone(values[currentId]) let oldValue = _.clone(values[currentId])
let newValue = callback(values[currentId], values[idList[index - 1]], values[idList[index + 1]]); let newValue = callback(values[currentId], values[idList[index - 1]], values[idList[index + 1]]);
if (oldValue && oldValue.text !== newValue.text) { if (!oldValue || oldValue.text !== newValue.text) {
values[currentId] = newValue values[currentId] = newValue
changed = true changed = true
} }