Fix for issue 5198

Make onKeyUp handler execute only once for the same value.