Try this:
Notice that this does *not* trigger the value change event. However, editing the value and then pressing enter triggers the ValueChange event.
Ahh, but you point out "Well, in that case, the value *did* actually change, so that's why the event fired." And you're right.
But then try this:
Seems super minor, I know. But I found myself in a situation where I want to trigger an event if a user hits "enter" in a numeric field, regardless of whether the value changed or not (e.g. it should be able to reassert the current value). Yes, the obvious solution is to handle the enter key press separately, but that means when the enter is used to assert a different value, I end up with *two* events.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.