Use the same syntax as the delete key

This commit is contained in:
Paul Kaplan 2018-02-07 11:35:59 -05:00
parent 09145a3bf1
commit 7f83411653

View file

@ -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();