Kendo Confirm/Alert not firing at correct time

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

    Posted 18 Apr 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.

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

    Thanks!

     

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    1609 posts

    Posted 20 Apr 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. 

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