Kendo Confirm/Alert not firing at correct time

2 posts, 0 answers
  1. Matthew
    Matthew avatar
    4 posts
    Member since:
    Feb 2017

    Posted 18 Apr 2018 Link to this post

    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.



  2. Ivan Danchev
    Ivan Danchev avatar
    1803 posts

    Posted 20 Apr 2018 Link to this post

    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. 

    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.
Back to Top