input listener for dynamic feedback output

How can I make an input listener that gets highlighted feedback in a timely way, but not too often?

Here’s what the user experience should be, on mobile or desktop:

  • While you are inputting a number, there should be no distractions.
  • If you pause for one second during entry, or when you are finished, the feedback should appear, be flagged in yellow, and slowly fade over the course of 5-10 seconds. (Won’t this interfere with the next response?)
  • You should not need to click outside the input field to trigger the response!

From my research:

  • onkeyup should work on mobile. Confirmed. So, let’s use onkeyup. [Research: why does it fail on the old cmjrCalcform? Appears to be due to the lack of browser support for default parameter values in Javascript function definitions
  • Two new problems:
    • on mobile, the backspace key doesn’t seem to count as a keyup-triggering button,
    • backspace does trigger keyup on desktop, except a backspace which takes us back to nothing in the field. In this case, it keeps the response value as it was when there was one character left.
















Leave a Reply