Skip to content

Commit

Permalink
[core] style: comment why start/clear timeout handlers are attached t…
Browse files Browse the repository at this point in the history
…o mouse events (#6784)
  • Loading branch information
gluxon committed May 3, 2024
1 parent 070b802 commit e094518
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/core/src/components/toast/toast2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ export const Toast2 = React.forwardRef<HTMLDivElement, ToastProps>((props, ref)
return (
<div
className={classNames(Classes.TOAST, Classes.intentClass(intent), className)}
// Pause timeouts if users are hovering over or click on the toast. The toast may have
// actions the user wants to click. It'd be a poor experience to "pull the toast" out
// from under them.
onBlur={startTimeout}
onFocus={clearTimeout}
onMouseEnter={clearTimeout}
Expand Down

1 comment on commit e094518

@svc-palantir-github
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[core] style: comment why start/clear timeout handlers are attached to mouse events (#6784)

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

Please sign in to comment.