Skip to content

fix(editor): preserve decimal number input drafts#241

Merged
DavidBabinec merged 2 commits into
mainfrom
fix/decimal-number-input-entry
Jul 22, 2026
Merged

fix(editor): preserve decimal number input drafts#241
DavidBabinec merged 2 commits into
mainfrom
fix/decimal-number-input-entry

Conversation

@DavidBabinec

Copy link
Copy Markdown
Contributor

Summary

  • preserve in-progress lexical states such as 0. and - while number-backed style fields are focused
  • keep the persisted CSSPropertyBag values numeric and finite while retaining live canvas updates
  • add regression coverage for decimal opacity entry and negative z-index, plus update the editor references

Root cause

ClassPropertyRow converted every input event to a number immediately. Typing the intermediate value 0. therefore stored 0, and the controlled input rerendered without the decimal point before the next digit could be entered.

Impact

Authors can type decimal values normally into number-backed style controls. Incomplete lexical states never enter the persisted site model, and blur restores the canonical stored value.

Verification

  • bun test — 6,218 passed, 1 skipped, 0 failed
  • bun run build
  • bun run lint
  • live Chromium retest: Opacity accepted 00.0.8, retained 0.8 after blur, and restored it after reload

Fixes #230

@DavidBabinec
DavidBabinec marked this pull request as ready for review July 22, 2026 21:01
@DavidBabinec
DavidBabinec merged commit bd760ea into main Jul 22, 2026
9 checks passed
@DavidBabinec
DavidBabinec deleted the fix/decimal-number-input-entry branch July 22, 2026 21:01
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.

[Bug]: number inputs will not accept decimals

1 participant