Fix IE11 errors occurring during EnterKeyHandling test. Fixes #17466.