test(actions): add defaultPrevented coverage for clickOutside (#195)
The action already checks event.defaultPrevented before dispatching clickoutside, but that branch had no test. Add the missing case and add a one-line comment explaining why capture phase is used. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ export function clickOutside(node: HTMLElement): { destroy: () => void } {
|
||||
}
|
||||
}
|
||||
|
||||
// Capture phase (true) ensures this fires before any child stopPropagation() calls.
|
||||
document.addEventListener('click', handleClick, true);
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user