Skip to content

fix: allow clean editing of portion unit input - #22

Merged
Friedjof merged 5 commits into
masterfrom
fix/portion-unit-input-editing
Jun 3, 2026
Merged

fix: allow clean editing of portion unit input#22
Friedjof merged 5 commits into
masterfrom
fix/portion-unit-input-editing

Conversation

@bschlagheck

Copy link
Copy Markdown
Collaborator

Summary

  • fix editing of the portion unit grams input in the web UI
  • fix the local ?mock=1 bootstrap for browser-based frontend testing

Root cause

The grams input normalized on every input event and immediately wrote the last valid value back into the field, which blocked normal digit deletion while editing.

The mock bootstrap in web/index.html used a document.write(...) path that broke rendering in the current dev setup.

Validation

  • reproduced in local browser mock
  • verified fix in local mock
  • ran a focused check for updatePortionUnit() commit/clamping behavior

@bschlagheck
bschlagheck requested a review from Friedjof June 2, 2026 18:59
@Friedjof
Friedjof merged commit b3cb409 into master Jun 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants