Added some events for focus and unfocus