mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2025-03-13 22:50:01 -04:00
Use the same syntax as the delete key
This commit is contained in:
parent
09145a3bf1
commit
7f83411653
1 changed files with 4 additions and 2 deletions
|
@ -15,8 +15,10 @@ class NudgeTool {
|
|||
this.onUpdateSvg = onUpdateSvg;
|
||||
}
|
||||
onKeyDown (event) {
|
||||
// Bail if the real event target is an input
|
||||
if (event.event.target.tagName === 'INPUT') return;
|
||||
if (event.event.target instanceof HTMLInputElement) {
|
||||
// Ignore nudge if a text input field is focused
|
||||
return;
|
||||
}
|
||||
|
||||
const nudgeAmount = 1 / paper.view.zoom;
|
||||
const selected = getSelectedRootItems();
|
||||
|
|
Loading…
Reference in a new issue