Treeview context menu covered by page default context menu

2 posts, 0 answers
  1. Daochuen
    Daochuen avatar
    70 posts
    Member since:
    Sep 2017

    Posted 24 Nov 2019 Link to this post

    Hello,

    I have kendo treeview in my MVC project. Treeview context menu was showed well in IE by right mouse clicking, but in Firefox the treeview context menu was covered by page default context menu. Could someone have the tip to resolve the context menu issue with Firefox?  Below are pieces of code for context menu. Attached image is context menu showed in IE and Firefox.

    Thanks in advance.

    ...
        function CreateContextMenu(targetTree) {
            var cxtMenuUl = $('#treeViewContextMenu');
            cxtMenuUl.css("white-space", "nowrap");
            if (cxtMenuUl) {
                cxtMenuUl.kendoContextMenu({
                    // listen to right-clicks on treeview container
                    target: targetTree,
                    dataSource: getContextData(),
                    orientation: "vertical",
                    select: selectFolderContextMenu,
                    filter: ".k-state-selected",
                    open: onOpenLeftContextMenu
                });
            }
        }

         function getContextData () {
            var data = [{ text: 'Delete', attr: { id: 'delete' } },
                    { text: "", cssClass: "k-separator" },
                    { text: 'Rename', attr: { id: 'rename' } },
                    { text: "", cssClass: "k-separator" },
                    { text: 'New Folder', attr: { id: 'newfolder' } },
                    { text: "", cssClass: "k-separator" },
                    { text: 'Upload', attr: { id: 'upload' } }];

            return data;
        }
    ...
  2. Dimitar
    Admin
    Dimitar avatar
    502 posts

    Posted 26 Nov 2019 Link to this post

    Hello,

    I answered the following forum thread, which is identical. To avoid threads duplication and provide faster responses, I would suggest continuing the communication in just one thread.

    Best regards,
    Dimitar
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top