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

ModalView - can't stop a close() event

1 Answer 27 Views
Report a bug
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Don
Top achievements
Rank 1
Don asked on 23 Apr 2014, 07:03 AM
If you bind to a ModalView's close event and call e.preventDefault() within it, the close event still continues.  Therefore, it appears that there is no way to short-circuit a close event.  This seems like a major oversight.

Here's an example:  http://trykendoui.telerik.com/@sweffect/ETif/5
(Note that if you open the console and run it, by the time "debugger;" is hit in onClose(), the ModalView is already closed.  That seems like a problem.)

On a related note, if the ModalView really needs more events such as the "deactivate" event on the Kendo UI Window widget which fires after the Window is completely closed.  Currently, there is no way to know when the ModalView is completely closed which is another problem.  It seems like the current ModalView's "close" event is somewhere between the Kendo UI Window's "close" and "deactivate" events.  It doesn't clearly act as either and thus is very limited in what it is useful for.

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 25 Apr 2014, 12:21 PM
Hi Donald,

Currently the close event cannot be prevented, but this looks like something usefull that we should add. This is why I opened an issue in our GitHub repo, where you can follow the progress and see when the feature is implemented:

https://github.com/telerik/kendo-ui-core/issues/33

As for your other suggestions, you can check our UserVoice section where you can submit your ideas.

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Report a bug
Asked by
Don
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or