added keyup close functionality