bootstrap 4.2.1 toast delay does not 'restart' if the toast is shown again before the timeout ends

Created on 2 Feb 2019  路  7Comments  路  Source: twbs/bootstrap

The title explains it well.

if(this._timeout !== null) { clearTimeout(this._timeout) }

The code above should be added in show() for the toast class at https://github.com/twbs/bootstrap/blob/9e4e94747bd698f4f61d48ed54c9c6d4d199bd32/js/src/toast.js#L80

  • Windows 10.0.17763 Build 17763
  • Version 71.0.3578.98 (Official Build) (64-bit)

Don't think there is need for a test case.

js v4

Most helpful comment

Same, but needs to be fixed.

All 7 comments

Hi @karimcambridge,

I tried to reproduce your issue but I'm not able to 馃槦
See my CodePen: https://codepen.io/Johann-S/pen/QYqrPw

https://codepen.io/karimcambridge/pen/RvLdGr

Try now, with a larger data-delay (5000).

Hmm ok now I understand 馃憤

For me in this particular use case, I would call manually show and hide method to avoid that behavior, but you're right we should fix that 馃憤

Thank you.

FYI for anyone still grappling with this, I worked around it by "disposing" of the toast before showing it again.

Same, but needs to be fixed.

Has this been fixed?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

kamov picture kamov  路  3Comments

ziyi2 picture ziyi2  路  3Comments

IamManchanda picture IamManchanda  路  3Comments

alvarotrigo picture alvarotrigo  路  3Comments