Ignore nudge when text field focused

This commit is contained in:
DD 2018-03-15 13:19:05 -04:00
parent f9aabe1beb
commit 254bbe1285

View file

@ -201,6 +201,11 @@ class TextTool extends paper.Tool {
}
}
handleKeyDown (event) {
if (event.event.target instanceof HTMLInputElement) {
// Ignore nudge if a text input field is focused
return;
}
if (this.mode === TextTool.SELECT_MODE) {
this.nudgeTool.onKeyUp(event);
} else if (this.mode === TextTool.TEXT_EDIT_MODE) {