Handle focus event