Fix an error when pressing escape in FireFox in search dialogs