This is a migrated thread and some comments may be shown as answers.

Kendo Confirm/Alert not firing at correct time

1 Answer 569 Views
Dialog
This is a migrated thread and some comments may be shown as answers.
Matthew
Top achievements
Rank 1
Matthew asked on 18 Apr 2018, 12:13 PM

Our team recently replaced all of our standard alerts, prompts, and confirm dialog boxes with Kendo.alert/confirm/prompt. After further inspection, it appears that the line executing the alert/confirm/prompt fires at random times after the line has been hit. This is not how a JavaScript alert/confirm/prompt box typically operates, and I expected that the Kendo dialogs would perform in the same manner. (A JavaScript alert/confirm/prompt box will pause execution until that specific alert has been completed.)

I've attached an example using the Kendo and JavaScript version to display the differences.

https://dojo.telerik.com/@45f672e3-cd24-4082-98bd-05c921b19513/OHUVoDAW

Thanks!

 

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 20 Apr 2018, 11:18 AM
Hello Matthew,

Neither of the Kendo UI dialogs (Dialog, Confirm, Prompt and Alert) has the ability to stop JavaScript execution. Only the built-in JavaScript dialog is synchronous and stops code execution. While you may detect when the Kendo dialog is closed and execute code when that happens, the rest of the code will be executed asynchronously thus it won't be paused by the Kendo UI dialog. We don't have a viable workaround that would allow you to overcome this, so if you want to achieve such behavior we would recommend using the standard dialogs. 

Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Dialog
Asked by
Matthew
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or