canvas-input: cancel with esc key

This commit is contained in:
jean-emmanuel 2016-11-17 21:25:19 +01:00
parent b9f87bb10e
commit 23b6ced070

View file

@ -76,8 +76,9 @@
if (e.originalEvent.target!=i[0]) {
i.blur()
}
}).on('keydown.popup', function(e){
}).on('keydown.fakeInput', function(e){
if (e.keyCode==13) i.change()
if (e.keyCode==27) i.off('change').blur()
})
})