Good day!
I have a context menu that is appearing when you right-click tree view nodes. Now the option in the context menu and its sub-menu is dependent with the node type.
My problem is, when I hover an option with a sub-menu, it always display the sub-menu to the left side of its parent and its being cutoff by the screen border. I tried different configuration for 'direction', 'orientation', 'popupCollision' and I can't seem to solve this issue.
In the attached file, I want to show the sub-menu on where the red rectangle is.
$('#nav_tree_menu').kendoContextMenu({
target: "#nav_tree",
filter: 'span.k-in',
alignToAnchor: true,
select: function(e) {
// nodeData (src), item (target)
...
...
},
open: function(e) {
if ($(e.item).is("li")) {
return;
}
var node = $(e.target);
var nodeData = treeView.dataItem(node);
...
// this is where the options based on the node "type"
this.setOptions({
dataSource: options
});
}
});
Thank you!
Ollie dG.
Note: the documentation on the Kendo menu provides how to close an item, but not the actual menu itself.
For example, the menu documentation on the Kendo menu states:
//intialize the menu widget
$("#menu").kendoMenu();
// get a reference to the menu widget
var menu = $("#menu").data("kendoMenu");
// close the sub menu of "Item1"
menu.close("#Item1");
Hello,
I have a 'hamburger' icon to open up a responsive panel on the menu, and am trying to remove it when the device is a desktop when the width is greater than the breakpoint. However, the menu item does not contain any text, it just shows the hamburger icon provided by font-awesome:
Code:
{ text: "", spriteCssClass: "fa fa-search", url: "javascript:createSearchWindow();"},
{ text: "", spriteCssClass: "fa fa-bars", url: "javascript:toggleSideBarPanel(<cfoutput>#layerNumber#</cfoutput>);" }
There is a remove method for the menu, but by looking at the example it needs to have a reference to the tree. Is it possible to remove the last item (fa fa-bars) and not the item above it that pops up the search window?
I have a really complex responsive panel, placed in several div's, but it does not work when the screen size is above the breakpoint. See http://gregoryalexander.com/blogCfc/client/ using a desktop device above 1280 pixels.
Hi
It appears that an animation bug has been introduced in 2019 SP1 of kendo ui jquery.
With the latest version, the animation for a context menu does not appear on the first call of .open()
Subsequent calls to .open() render the correct animation.
Dojo #1 shows the animation working first click
http://dojo.telerik.com/UJawAnAH
Dojo #2 shows the animation not working on the first click
http://dojo.telerik.com/oNerIDAQ
Regards
I am building a custom widget with a kendo.ui.ContextMenu,
On Alt+M KeyUp event I open the menu using this.menu.open().
Following opening, I would like the menu to have the focus to navigate with arrow keys.
How can I achieve that?
I notice this even in the Kendo UI menu demos. The bottom of the sub menus has a jitter, more apparent if using the material theme, but exists in all themes. The bottom option is cut off half-way and then flashes to the corrected height. It does something similar with any of the animations.
Is there any way to fix this?
I have used code from this example - https://docs.telerik.com/kendo-ui/controls/scheduling/scheduler/how-to/AngularJS/editing-using-contextmenu - to create a context menu.
Occasionally the menu will close immediately after it is displayed, so all you see is a flash of the menu. This has only happened on Chrome on Windows 10.
It only happens very occasionally, I cannot recreate it at will.
Pressing F5 does not fix it. Only restarting Chrome seems to fix the issue.
See attached video which shows menu 'flashing' for a moment,
When using a large context menu that doesn't fit on the screen, a scrollbar is shown within the context menu. Unfortunately the scrollbar is not shown when the context menu contains multiple nesting levels.
Example https://dojo.telerik.com/uYUqazaP. This example shows a context menu with a single nesting level, which correctly displays a scrollbar. The other context menu contains 2 levels of nesting, which does NOT show the scrollbar.