Fix the support of event detection for animate element