Remove old 'Escape' event
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
8024dce1b0
commit
37a8482a87
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user