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

Setting extendedTimeOut to zero, toastr still dismisses after hover #233

Open
smlombardi opened this issue Oct 27, 2017 · 2 comments
Open

Comments

@smlombardi
Copy link

I would like a toastr to stay open unless explicitly closed by the user.

Setting timeOut: 0 keeps it open, but then if the toastr is hovered, it closes after second. So I have tried:

     closeButtonWarning: function () {
        toastr.warning('Low Funds. <a href="somelink">Add postage</a>', {
          closeButton: true,
          timeOut: 0,
          extendedTimeOut: 0
        });
      },

But it still closes after hover. I can set something like extendedTimeOut: 10000, but it will still close (after 10 seconds of course). I don't want it to close by itself at all.

@marcoooo
Copy link

marcoooo commented Nov 21, 2017

You may set as well these parameters :

  • showDuration: 0,
  • hideDuration: 0,
  • timeOut: 0,
  • extendedTimeOut: 0

regards.

@Husterknupp
Copy link

Husterknupp commented Mar 7, 2018

I also came across the hover feature which happens to be rather confusing for me. But apparently my use case of not hiding after hover is not the regular case. In CodeSeven/toastr I am able to set closeOnHover = false to achieve this behavior. With this one I'd need to give up any timeout in order to not close on hover.

i.e., those two behave rather identically

toastr.success('Stay open after hover.', {timeOut: 20000, closeOnHover: false}); // CodeSeven/toastr
toastr.success('Stay open after hover.', {timeOut: 20000, extendedTimeOut: 20000}); // angular-toastr

Anyway, since I spent a while in the source code to find out, would it make sense to document the hover feature focused on this 'stay open after hover' use case? You can easily overlook that part currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants