"x" window closing button is closing the window before close event is executed

0 Answers 149 Views
Dialog Window
user192
Top achievements
Rank 1
user192 asked on 07 Nov 2022, 02:30 PM
As can be seen in the following example: https://dojo.telerik.com/@user192/aboNODeL , the "x" window closing button behaves differently from the self created closing button, as it closes the window before firing the close event. After the window is closed and pressing the open button to open the window again, the "x" window closing button behaves in the same way as the "close" button though. The close event gets fired instead of closing the window beforehand. Does anyone know why this happens and how to prevent the window from closing using the "x" button?
Martin
Telerik team
commented on 10 Nov 2022, 02:20 PM

The close event is not prevented when hitting the X button because of this line. It initializes the Window anew and causes the problematic behaviour. Check the modified example and let me know how it works.

$("#window").kendoWindow();

user192
Top achievements
Rank 1
commented on 14 Nov 2022, 12:58 PM

This is the solution indeed. Thank you!

No answers yet. Maybe you can help?

Tags
Dialog Window
Asked by
user192
Top achievements
Rank 1
Share this question
or