mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2024-12-23 05:52:42 -05:00
Ignore nudge when text field focused
This commit is contained in:
parent
f9aabe1beb
commit
254bbe1285
1 changed files with 5 additions and 0 deletions
|
@ -201,6 +201,11 @@ class TextTool extends paper.Tool {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
handleKeyDown (event) {
|
handleKeyDown (event) {
|
||||||
|
if (event.event.target instanceof HTMLInputElement) {
|
||||||
|
// Ignore nudge if a text input field is focused
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.mode === TextTool.SELECT_MODE) {
|
if (this.mode === TextTool.SELECT_MODE) {
|
||||||
this.nudgeTool.onKeyUp(event);
|
this.nudgeTool.onKeyUp(event);
|
||||||
} else if (this.mode === TextTool.TEXT_EDIT_MODE) {
|
} else if (this.mode === TextTool.TEXT_EDIT_MODE) {
|
||||||
|
|
Loading…
Reference in a new issue