Control js - added functionality to reject enter