From 6126a263234324483eec16040472a4416086a365 Mon Sep 17 00:00:00 2001 From: bordun Date: Wed, 27 Feb 2019 10:50:53 +0100 Subject: [PATCH] keys: binding conflict with editorkeys: binding conflict with editor (#473) --- CHANGELOG.md | 7 ++++++- src/client/app/widgets/inputs/keys.js | 12 ++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 032dcbef..5d3658bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/client/app/widgets/inputs/keys.js b/src/client/app/widgets/inputs/keys.js index a063960d..33517af1 100644 --- a/src/client/app/widgets/inputs/keys.js +++ b/src/client/app/widgets/inputs/keys.js @@ -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) + + }) }