ModalView - can't stop a close() event

2 posts, 0 answers
  1. Don
    Don avatar
    66 posts
    Member since:
    Jun 2012

    Posted 23 Apr 2014 Link to this post

    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:
    (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.
  2. Kiril Nikolov
    Kiril Nikolov avatar
    2543 posts

    Posted 25 Apr 2014 Link to this post

    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:

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

    Kiril Nikolov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top