kendo.mobile.ui.ActionSheet open event not fired

4 posts, 0 answers
  1. Karman
    Karman avatar
    4 posts
    Member since:
    Nov 2014

    Posted 12 Apr Link to this post

    There should be an open event for the mobile actionsheet (according to the docs at: https://docs.telerik.com/kendo-ui/api/javascript/mobile/ui/actionsheet/events/open ) but looks like it never fires.

     

    The code needs one additional line to trigger the event:

    kendo.mobile.ui.ActionSheet.prototype.open = function(target, context) {
                var that = this;
                that.target = $(target);
                that.context = context;
                that.shim.show(target);
        that.trigger('open', { target: target, context: context }); /* trigger open event*/

            };

  2. Dimitar
    Admin
    Dimitar avatar
    648 posts

    Posted 16 Apr Link to this post

    Hello Karman,

    On the following Dojo example you can find a simple Kendo Hybrid Application. With it, when the "Open" button is clicked, the corresponding event handler is being successfully executed. Here is a short screencast that demonstrates the behavior on my end.

    Could you test the above example and verify if it is working correctly on your end? If this is not the case, modify the Dojo accordingly and then send it back so that I am able to examine the exact scenario.

    Regards,
    Dimitar
    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.
  3. Karman
    Karman avatar
    4 posts
    Member since:
    Nov 2014

    Posted 18 Apr in reply to Dimitar Link to this post

    Hi,

    Thanks, your code works as you said, so it may be a difference how I use the actionsheet in my code, which is not a kendo mobile application.

    Please see my example which shows how I'm using it, where the close event works as I expect, but the open doesn't. I included my patch if you uncomment it, the open event fires as well:

    https://dojo.telerik.com/ORImuLOf

  4. Dimitar
    Admin
    Dimitar avatar
    648 posts

    Posted 19 Apr Link to this post

    Hi Karman,

    The Mobile ActionSheet widget is part of the Kendo Hybrid UI framework and is intended to be used in a Hybrid UI Application. Also, the ActionSheet should be placed inside a mobile View similar to the setup provided in my previous reply. This is described in the ActionSheet Overview Article.

    Taking the above into consideration, the recommended approach for using the ActionSheet is in Kendo Application. However, in case you would like to continue with the current approach, you could try to trigger the open event as follows:
    $('#openBtn').bind('click', function(e){
      var actionSheet = $('#actionsheet').data('kendoMobileActionSheet');
     
      actionSheet.open();
      actionSheet.trigger("open");
    });

    Regards,
    Dimitar
    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