Debug event listeners and handlers that aren't firing correctly
Help me debug event handling issues in my application.
**Framework/Library:** {{FRAMEWORK}}
**Event handler code:**
```{{LANGUAGE}}
{{EVENT_CODE}}
```
**HTML/DOM structure (if applicable):**
```html
{{HTML}}
```
**Event type:** {{EVENT_TYPE}}
**Expected trigger:** {{EXPECTED_TRIGGER}}
**What's happening:** {{ACTUAL_BEHAVIOR}}
Please provide:
1. **Binding Analysis**: Verify event listener is correctly attached
2. **Timing Issues**: Check if DOM is ready when binding
3. **Bubbling/Capturing**: Analyze event propagation
4. **this Context**: Verify correct context binding
5. **Event Delegation**: Check delegation setup if used
6. **Fixed Code**: Corrected event handling code
7. **Memory Leaks**: Ensure listeners are properly cleaned up
8. **Debugging Tips**: How to debug events with DevToolsOr press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[{FRAMEWORK][{LANGUAGE][{EVENT_CODE][{HTML][{EVENT_TYPE][{EXPECTED_TRIGGER][{ACTUAL_BEHAVIOR]