Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toast doesn't get automatically dismissed #156

Closed
fercarcedo opened this issue Dec 28, 2020 · 2 comments
Closed

Toast doesn't get automatically dismissed #156

fercarcedo opened this issue Dec 28, 2020 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@fercarcedo
Copy link

fercarcedo commented Dec 28, 2020

Versions

  • 2.0: starting with 2.0.0-beta.6 all the way to the current release as of writing, 2.0.0-beta.9

Describe the bug

A toast doesn't get automatically dismissed after the defined timeout, although clicking on the close button works as expected

Expected behavior

The toast should get automatically dismissed after the defined timeout. On version 2.0.0-beta.5 it works as expected

Steps to reproduce

  1. Configure the library to use a timeout
  2. Display a toast
  3. Wait for the timeout to expire
const toastOptions = {
  position: "bottom-right",
  icon: false,
  timeout: 2000,
  draggabe: false
};

createApp(App).use(Toast, toastOptions);

import { useToast } from 'vue-toastification';
const toast = useToast();
toast("test");

Your Environment

  • OS: Ubuntu 20.04
  • Browser: Firefox 84.0. Also tested on Chrome 86.0.4240.198
@fercarcedo fercarcedo added Status: Available Type: Bug Something isn't working labels Dec 28, 2020
@Maronato
Copy link
Owner

Hello! Thanks for reporting :)

This seems like a duplicate of #142, #137

This is not an issue with vue-toastification, but with vue, to which the solution is described here: vuejs/core#2429 (comment)

The tl;dr is that you must upgrade your vue and @vue/compiler-sfc and make sure that they are on the same version.

Below is a CodeSandbox demo showing that toasts are correctly being dismissed with vue-toastification@2.0.0-beta.9 and vue@^3.0.0-0:

Edit cold-darkness-ci83x

CleanShot 2020-12-29 at 07 52 21

If you manage to upgrade vue, @vue/compiler-sfc and still are facing issues, please put together a small reproduction repo/codesandbox so that I can investigate further. For now, I'll close this as it's not reproducible.

@fercarcedo
Copy link
Author

For some reason I had vue 3.0.0 for both dependencies, but it didn't work. I updated the two dependencies to 3.0.4 and it all works just fine.

Thank you

@Maronato Maronato added duplicate This issue or pull request already exists and removed Status: Available Type: Bug Something isn't working labels Jan 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants