added focusout event to fix issue of leaving edit box without pressing enter