Fix for the enter key/esc key for chrome issue

Reviewer: Tiff Go (post commit)

Issue: GCP-8935