I need to trigger an input change event, but only if the value changed. And I need this done from a keyboard event. Is there a way to invoke the browser's change mechanism which will either trigger the change event to fire, or will not depending on if the value was modified?
Example:
User clicks on an input field
User does not modify value of the field
user presses a key causing the input field to blue
onchange does not get triggered.
vs
User clicks on an input field
User modifies the value of the field
user presses a key causing the input field to blue
onchange gets triggered.
Is this possible? Or I need to do the onfocus save value, onblur compare and possibly call onchange, but only if onchange was not already called because the user just navigated away by clicking vs say a keyboard trigger.