keys: binding conflict with editorkeys: binding conflict with editor (#473)
This commit is contained in:
parent
a3b4878fb0
commit
0bdbd8c347
2 changed files with 16 additions and 3 deletions
|
|
@ -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)
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue