question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgrade to sweetalert v2.x

See original GitHub issue

If I call one message dialog after another, the second one will be not executed also its callback function will be not executed. With 1 second delay it will be executed, with 100ms delay it will be sometimes executed.

abp.message.confirm("msg", "Continue?",
                    function (isConfirmed) {
                        if (isConfirmed) {
                            setTimeout(function () {
                               abp.message.confirm("another warning msg", "Continue?", ....)                                
                            }, 1000);
                        }

The problem is described also here: https://github.com/t4t5/sweetalert/issues/472

The solution could be https://limonte.github.io/sweetalert2/#chaining-modals

swal({
  title: 'Are you sure?',
  text: "You won't be able to revert this!",
  type: 'warning',
  showCancelButton: true,
  confirmButtonColor: '#3085d6',
  cancelButtonColor: '#d33',
  confirmButtonText: 'Yes, delete it!'
}).then(function () {
  swal(
    'Deleted!',
    'Your file has been deleted.',
    'success'
  )
})

But ABP use SweetAlert - Sadly it feels like this project has been abandoned. Would it be possible to change SweetAlert to SweetAlert2?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
hikalkancommented, Oct 11, 2017

Not changed yet. You can integrate any library by overriding js functions (like abp.message.info = …). See https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.Web.Resources/Abp/Framework/scripts/libs/abp.sweet-alert.js for the implementation.

0reactions
hikalkancommented, Nov 15, 2017

Final decision is to upgrade sweetalert to v2.x. See https://github.com/aspnetboilerplate/aspnetboilerplate/pull/2694

Read more comments on GitHub >

github_iconTop Results From Across the Web

Guides
A beautiful replacement for JavaScript's 'alert'
Read more >
SweetAlert2 - a beautiful, responsive, customizable and ...
A beautiful, responsive, customizable and accessible (WAI-ARIA) replacement for JavaScript's popup boxes.
Read more >
a beautiful, responsive, customizable and accessible (WAI- ...
A beautiful, responsive, customizable and accessible (WAI-ARIA) replacement for JavaScript's popup boxes.
Read more >
Install SweetAlert 2 | npm install | Laravel Livewire CRUD
... https://laravel-livewire.com/docs/ 2. x /rendering-components#page-components Timestamps: 00:00 Introduction 01:00 Install SweetAlert 01:25 ...
Read more >
sweetalert | Yarn - Package Manager
A beautiful replacement for JavaScript's "alert". npm version Build status. A success modal. Installation. $ npm install --save sweetalert. Usage.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found