Skip to content

[Bug] Custom preset width/height inputs don't validate minimum dimensions #24

@magic-peach

Description

@magic-peach

Bug Description

The custom preset inputs in PresetSelector.tsx have HTML min='16' and max='7680' attributes, but there's no JavaScript-level validation preventing users from typing values like 0, 1, or negative numbers via keyboard. These values bypass the HTML validation and get passed to FFmpeg, causing encoding errors.

Steps to Reproduce

  1. Select 'Custom' preset
  2. Click on the width input and manually clear it, then type '-1' or '0'
  3. Click Export
  4. FFmpeg error occurs

Expected Behavior

JavaScript validation should prevent invalid dimension values before export is triggered.

File Reference

  • src/components/PresetSelector.tsx — custom input onChange handlers
  • src/hooks/useVideoEditor.tshandleExport() should validate recipe before starting

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions