Switch to hasClass() for focus check