Completed
Last Updated: 03 Dec 2021 07:38 by ADMIN
Jason
Created on: 17 Oct 2014 22:47
Category: Kendo UI for jQuery
Type: Feature Request
2
Bug in KendoUI ContextMenu docs and TypeScript typings file for Close method
Regarding KendoUI ContextMenu close() method- I believe there is a flaw in the API docs and in the TypeScript typings file. See below:

See API docs at: http://docs.telerik.com/kendo-ui/api/javascript/ui/contextmenu

In the sample for the close method on this page, it has this portion:

    // get a reference to the ContextMenu widget
    var contextMenu = $("#context-menu").data("kendoContextMenu");
    // close the ContextMenu
    contextMenu.close(100, 100);

The "100, 100" params passed here are not needed and looks to be a copy paste from the open() method sample in the api docs. The open() sample passes (100, 100) as x/y coordinates.

Regarding the TypeScript kendo.all.d.ts file the ContextMenu class has this definition for close:
        close(element: Element): kendo.ui.ContextMenu;
        close(element: JQuery): kendo.ui.ContextMenu;
But again, I believe it should take no params.

Please let me know if you confirm this to be the case and if you fix the typings file. Thanks!
0 comments