change(ui): prevent player playing during editing of fields
This commit is contained in:
parent
fcf80e4b76
commit
b129b526f3
3 changed files with 5 additions and 5 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export default (props: Props) => {
|
|||
const { className = '', label = '', ...rest } = props;
|
||||
return (
|
||||
<label className={cn('flex items-center cursor-pointer', className)}>
|
||||
<input type="checkbox" onChange={() => null} {...rest} />
|
||||
<input type="checkbox" onChange={() => null} {...rest} />
|
||||
{label && <span className="ml-2 select-none mb-0">{label}</span>}
|
||||
</label>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue