keys: binding conflict with editorkeys: binding conflict with editor (#473)

This commit is contained in:
bordun 2019-02-27 10:50:53 +01:00
parent a3b4878fb0
commit 0bdbd8c347
2 changed files with 16 additions and 3 deletions

View file

@ -1,12 +1,17 @@
# Changelog
## 0.41.6
- bug fixes
- keys: binding conflict with editor
## 0.41.5
- bug fixes
- editor: changes applied to wrong widget when clicking on a widget while editing another widget's property
- push: allow setting `value` property
- allow whitespaces in path for `--custom-module`
- error when changing a property that's inherited by a widget to define its address and at least one non-dynamic property
- error when changing a property that's inherited by a widget to define its address and at least one non-dynamic property
- widgets
- sliders: when `steps` is set, scrolling on the widget makes it go directly from one step to another

View file

@ -44,7 +44,11 @@ class Keys extends Widget {
this.keyDownHandler = this.keyDown.bind(this)
this.keyUpHandler = this.keyUp.bind(this)
keyboardJS.bind(this.getProp('binding'), this.keyDownHandler, this.keyUpHandler)
keyboardJS.withContext('global', ()=>{
keyboardJS.bind(this.getProp('binding'), this.keyDownHandler, this.keyUpHandler)
})
}
@ -56,7 +60,11 @@ class Keys extends Widget {
if (this.getProp('binding')) {
keyboardJS.unbind(this.getProp('binding'), this.keyDownHandler, this.keyUpHandler)
keyboardJS.withContext('global', ()=>{
keyboardJS.unbind(this.getProp('binding'), this.keyDownHandler, this.keyUpHandler)
})
}