Work around an issue in angular that reinitializes a repeater and causes focus loss by adding an outside-click directive