Skip to content

Conversation

@bcampardou
Copy link

@bcampardou bcampardou commented Jul 31, 2017

Simply disable the timer when Bert.defaults.hideDelay = -1 for example.

#41 How can I keep bert alert on screen and manually close it?

Edit : with latest commit also fix #23 #37 #13

You can configure all alerts to be manually closed :
Bert.defaults.hideDelay = -1

or specify an alert to be manually closed by using :

    Bert.alert({
        message:'Event updated !', 
        type:'success', 
        hideDelay: -1
    });
    Bert.alert({
        message:'Event updated !', 
        type:'success', 
        hideDelay: 3000
    });

or

Bert.alert('Event updated !', 'success', null, null, -1);
Bert.alert('Event updated !', 'success', null, null, 3000);

@bcampardou bcampardou changed the title Manually close alert on click Manually close alert on click / disable auto hide Jul 31, 2017
@themeteorchef
Copy link
Owner

Hi @BaobabCoder thank you for taking the time to do this :) Going to review now.

@themeteorchef
Copy link
Owner

@BaobabCoder there seems to be an issue with the new this.hideDelay value being introduced.

It's referenced here but never defined anywhere else in the file. This is causing the alert to stay on screen until the user clicks (as expected when passing -1), but if I pass a custom delay value like your example 3000, the alert still displays indefinitely.

Can you take a look at this for me and let me know if I'm missing something? For reference, I used the two example calls in your comment above to test (both the advanced and standard versions).

@bcampardou
Copy link
Author

sure ! I'll take a look as soon as possible. I'm sorry my tests passed.

@bcampardou
Copy link
Author

bcampardou commented Aug 19, 2017

@themeteorchef i've made a mistake. Fixed now :)

@bluefangs
Copy link

bluefangs commented Sep 1, 2017

How does one close the alert manually? Is it by pressing anywhere on the bert message like normal? Do we or can we have a close button?

@cleverbeagle
Copy link
Collaborator

@bluefangs just clicking on the Bert closes it at the moment.

@bcampardou
Copy link
Author

bcampardou commented Sep 4, 2017

I did not add buttons. The feature "close on click" was already present

@bcampardou
Copy link
Author

Is this repository dead ?

@cleverbeagle
Copy link
Collaborator

In a brief coma. Bert was poisoned while taking part in an experiment in which he consumed expired tofu for a month straight. He's currently showing signs of life and just recently mumbled "yoga" the other day. We're optimistic of his recovery :)

@maxpdx
Copy link

maxpdx commented Jan 26, 2018

We believe in you Bert! You can do it!

@cleverbeagle
Copy link
Collaborator

@maxpdx
7055470589_af30f6a6c9_z

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

Successfully merging this pull request may close these issues.

Alerts don't stay on page (make autohide optional)

5 participants