Skip to content

Commit

Permalink
fix(cdk): provided double value is non-finite
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Jul 19, 2024
1 parent 54e6a71 commit 3d5df07
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion projects/cdk/utils/focus/set-native-mouse-focused.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ export function tuiSetNativeMouseFocused(
}

if (typeof Event === 'function') {
element.dispatchEvent(new Event('mousedown', {bubbles: true, cancelable: true}));
element.dispatchEvent(
new MouseEvent('mousedown', {
bubbles: true,
cancelable: true,
}),
);
} else {
const event = element.ownerDocument.createEvent('Event');

Expand Down

0 comments on commit 3d5df07

Please sign in to comment.