input: don't submit value when leaving focus (even with Tab key)

This commit is contained in:
jean-emmanuel 2017-10-05 10:48:22 +02:00
parent d521f0d260
commit 39ae150a81
2 changed files with 2 additions and 1 deletions

View file

@ -8,6 +8,7 @@
- messages received almost simultaneously are now bundled before being sent to the clients. This helps preserving their order.
- widgets
- sliders/pads: when receiving feedback while touched, the widget waits to be released before updating to the latest received value.
- input: the widget's value is no longer validated when leaving focus by clicking somewhere else or hitting the `Tab` key (it must be submitted by hitting the `Enter` key)
- misc
- property fields are now parsed using [JSON5](https://github.com/json5/json5), a more flexible notation. Session files are still written in standard JSON format, this is just a way to avoid typing mistakes when using the editor.
- remote editing also accepts JSON5 notation

View file

@ -84,7 +84,7 @@ module.exports = class Input extends _canvas_base {
.prependTo(this.widget)
.focus()
.on('blur', (e)=>{
this.blur()
this.blur(false)
})
.on('keydown', (e)=>{
if (e.keyCode==13) this.blur()