Fix a race condition where the clickOutside action's update() method would remove and re-add the event listener every time it was called, even when the enabled state hadn't changed. This caused clicks to be missed during the setTimeout delay. Changes: - Track previous enabled state before updating - Only use setTimeout when transitioning from disabled to enabled - Immediately re-add listener when enabled state stays true - No listener changes when enabled state stays false This ensures click-outside events are consistently detected without gaps in event listener registration. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| clickOutside.ts | ||
| tooltip.ts | ||