Replaced focus hack with a proper fix, now uses an event listener on the directive