You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
as pointed out by @abelgomez the $.confirm instances don't dismiss on escape key or submit on enter,
note to self;
fix escape key each confirm should look like $.confirm({backgroundDismiss: true, ...})
fix enter key
Slightly more involved, will have to wrap content in a <form> and then add event listener to onContentReady
$.confirm({
...
content: `<form>
...
</form>`
...
buttons: {
doSomething: {
...
keys: ['enter'],
...
}
},
onContentReady: function () {
// bind to events
var jc = this;
this.$content.find('form').on('submit', function (e) {
// if the user submits the form by pressing enter in the field.
e.preventDefault();
jc.$$BUTTON NAME HERE.trigger('click'); // reference the button and click it
});
}
});
The text was updated successfully, but these errors were encountered:
The problem with this is that it requires adding additional code to block pressing escape once the user has clicked the button - this isn't a find and replace job so it becomes quite a big time investment.
Going to leave it open for the time being and move off 0.11.0
as pointed out by @abelgomez the
$.confirm
instances don't dismiss on escape key or submit on enter,note to self;
fix escape key each confirm should look like
$.confirm({backgroundDismiss: true, ...})
fix enter key
Slightly more involved, will have to wrap
content
in a<form>
and then add event listener toonContentReady
The text was updated successfully, but these errors were encountered: