Oli8 / spaper

PaperCSS components for Svelte
https://oli8.github.io/spaper/
MIT License
199 stars 9 forks source link

Hovering on a toast then leave the area closes the toast even if there's remaining time (when `pause on hover` is checked) #47

Open mehdi-dalil opened 2 years ago

mehdi-dalil commented 2 years ago

Proposition

// Toast.svelte

[...]

export let startedTime: Date;

[...]

function dismiss() {
  if (!pauseOnHover || indefinite) return;
  if ((new Date().valueOf()) - startedTime.valueOf() < duration) return;

  close();
}
Oli8 commented 2 years ago

Hey @mehdi-dalil , thanks for the feedback, I couldn't reproduce the issue though. Could you provide a repl maybe ? Thanks

cazicbor commented 1 year ago

Hi all, Saw that this issue is still open, no news about it @mehdi-dalil ?