diff --git a/src/Snackbar/Snackbar.js b/src/Snackbar/Snackbar.js index 951dfbcfd5d6c1..decb388d83a6e7 100644 --- a/src/Snackbar/Snackbar.js +++ b/src/Snackbar/Snackbar.js @@ -274,11 +274,14 @@ class Snackbar extends React.Component { } }; - // Pause the timer when the user is interacting with the Snackbar or when he can't see it. + // Pause the timer when the user is interacting with the Snackbar + // or when the user hide the window. handlePause = () => { clearTimeout(this.timerAutoHide); }; + // Restart the timer when the user is no longer interacting with the Snackbar + // or when the window is shown back. handleResume = () => { if (this.props.autoHideDuration !== null) { this.setAutoHideTimer(this.props.autoHideDuration * 0.5);