 |
The javascript (conversion.js)
which is used on decimal input fields
(MifosDecimalInput.java, or mifos:mifosdecimalinput
in places like feesedit.jsp), has many problems:
1. The discrepency between keypad and normal number
keys (issue 554). Seems to be Firefox only. With IE, I get
the same behavior with either kind of key (which is
that attempting to type a second digit after the
decimal point causes it to flash and go away).
2. After typing the keypad second digit, then
other keys which used to work (like arrows and
backspace) stop working (again, Firefox only).
3. Per discussion with Emily, it is poor user
experience for a user to type things and have them
not show up on the screen. Currently, this is
true by design for anything but numbers, as
far as I can tell. A better design is to wait
until the user clicks Preview, and then show
the errors on the page. (That we should wait for
Preview is one of our HtmlStandards).
4. The javascript lacks tests. Javascript can
be tested with something called JSUnit, but we
are not doing that.
5. Other Firefox features, like control-T to
open a new tab, stop working when that field is active.
I couldn't find an IE feature which stopped working
although I'm not sure this is Firefox-specific.
6. The javascript has strange complications, like
trying to handle Hindi and Arabic (as opposed to
Western/international) digits. This is not
a requirement now, and maybe not ever.
The desired direction is to get rid of conversion.js,
and replace it with server-side validation.
MifosDecimalInput
is used in about 50 places, and
the quick fix of ripping out the javascript
is not sufficient - one gets internal errors
on preview.
Some related (or possibly related) bugs in the
IssueTracker are 55, 178, and 554.
|