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

kendo.mobile.ui.ActionSheet open event not fired

3 Answers 103 Views
General Disccussions
This is a migrated thread and some comments may be shown as answers.
Karman
Top achievements
Rank 1
Karman asked on 12 Apr 2019, 03:43 PM

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*/

        };

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 16 Apr 2019, 09:51 AM
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.
0
Karman
Top achievements
Rank 1
answered on 18 Apr 2019, 08:55 AM

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

0
Dimitar
Telerik team
answered on 19 Apr 2019, 08:27 AM
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.
Tags
General Disccussions
Asked by
Karman
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Karman
Top achievements
Rank 1
Share this question
or