Implement before blur/focus events