mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 06:00:56 -05:00
Avoid using the wrong PaperScope in keyboard events.
This commit is contained in:
parent
4f32cc2eea
commit
7e660b05e3
1 changed files with 2 additions and 0 deletions
|
@ -71,6 +71,8 @@ var Key = new function() {
|
|||
tool = scope && scope._tool;
|
||||
keyMap[key] = down;
|
||||
if (tool && tool.responds(type)) {
|
||||
// Update global reference to this scope.
|
||||
paper = scope;
|
||||
// Call the onKeyDown or onKeyUp handler if present
|
||||
tool.fire(type, new KeyEvent(down, key, character, event));
|
||||
if (view)
|
||||
|
|
Loading…
Reference in a new issue