change(ui): prevent player playing during editing of fields

This commit is contained in:
sylenien 2022-11-03 11:15:22 +01:00 committed by Delirium
parent fcf80e4b76
commit b129b526f3
3 changed files with 5 additions and 5 deletions

View file

@ -26,7 +26,7 @@ function PlayIconLayer({ playing, togglePlay, notesEdit }: Props) {
const getIsEdit = React.useCallback(() => notesEdit, [notesEdit])
const onKeyDown = (e: any) => {
if (getIsEdit()) return;
if (getIsEdit() || e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) return;
if (e.key === ' ') {
togglePlayAnimated();
}