danielo515 / obsidian-modal-form

Define forms for filling data that you will be able to open from anywhere you can run JS
https://danielorodriguez.com/obsidian-modal-form/
MIT License
187 stars 14 forks source link

Allow decimal inputs for number fields #237

Closed fetwar closed 4 months ago

fetwar commented 4 months ago

Bugfix for https://github.com/danielo515/obsidian-modal-form/issues/186

Sets the HTML input property step to any when field type is number - allowing non-whole numbers to be input.

This aligns the frontend visual feedback to the user with the backend validation, which would previously let inputs through, but apply CSS rules for invalid input.


Would be nice to have this configurable in the modal form editor as a future enhancement, along with min and max attributes.

danielo515 commented 4 months ago

@fetwar do you mind re-wording your commit message to read like: fix: allow decimal inputs for number fields That is the only way the automatic deploy and changelog will pick it up.

fetwar commented 4 months ago

No problem, will do

fetwar commented 4 months ago

@danielo515 I have pushed the commit message amendment, no content changes from the PR previously.

... just realised I used a capital letter and you didn't in your advised PR message. If this is an issue let me know and I will amend again lol

danielo515 commented 4 months ago

Thank you @fetwar