Enter button deletes the protected branch even if on-screen delete button is disabled (due to wrong or no value)

When deleting a protected branch on a project, it asks for branch name to be written manually before the delete button is enabled and branch could be deleted. But if the person just press key on keyboard with wrong text or even empty string, button is not enabled but branch is deleted.

image