UC-Davis-molecular-computing / scadnano

Web application for designing DNA structures such as DNA origami.
https://scadnano.org
MIT License
22 stars 13 forks source link

Cannot delete leftmost digit of dialog boxes number inputs #445

Open UnHumbleBen opened 4 years ago

UnHumbleBen commented 4 years ago

For dialog boxes number inputs, the leftmost digit cannot be deleted. This is unexpected and inconvenient to adjust values.

For example, right click on a helix and click "adjust max offset". You can't delete the leftmost digit.

dave-doty commented 4 years ago

Hopefully this can be fixed by adjusting the regex we use to specify valid inputs; however, I don't recall which form elements use that and which use the standard HTML "number" input form element (where this may be default behavior).

dave-doty commented 4 years ago

It seems reasonable to modify the regex to accept the empty string, e.g., here:

https://github.com/UC-Davis-molecular-computing/scadnano/blob/dc1e16f3209f71239fff5a672b2b5101f4426927/lib/src/view/design_dialog_form.dart#L193

changing the + to *. There's also DialogFloat, where it would be more complex.