Skip to main content

Search and Top Navigation

#9677 closed bug (invalid)

Opened November 27, 2013 10:32AM UTC

Closed December 12, 2013 08:48AM UTC

Overlapping menu issue

Reported by: Sebastien_TraceParts Owned by: Sebastien_TraceParts
Priority: minor Milestone: none
Component: ui.core Version: 1.10.3
Keywords: Cc:
Blocked by: Blocking:
Description

Hi,

Great tools you have made.

I have encountered an issue using menu. It seldoms happen but there is an overlapping between the 2 menu levels - see the screenshot attached.

[[Image(https://f.cloud.github.com/assets/3601250/1581296/bcb0c0fa-51d2-11e3-8895-ee253eadc793.jpg)]]

I am using a external library to create js context menu http://plugins.jquery.com/ui-contextmenu/. This library is based on jquery-ui. I have reported the bug to the team but they have redirected me to you as they say it seems to be related to jQuery UI Menu itself.

Here the code I used :

$("#html-container").contextmenu({
                    delegate: ".hasContextMenu",
                    menu: "#options",
                    show: { effect: "blind", duration: 100 },
                    position: function (event, ui) {
                        return { my: "left top", at: "left", of: event, collision: "flipfit", within: $("#html-viewport") }
                    },
                    preventSelect: true,
                    blur: function (event, ui) {
                        if (event.toElement && event.toElement.id == 'canvas')
                            this.close();
                    },
                    beforeOpen: function (event, ui) {
                        if (!enableContextMenu) {
                            enableContextMenu = options.EnableContextMenu;
                            return false;
                        } else {
                            if (!DirectionalLightCastShadow && !SpotLightCastShadow)
                                $("#html-container").contextmenu("showEntry", "shadow-control-element", false);
                            else
                                $("#html-container").contextmenu("showEntry", "shadow-control-element", true);
                        }

                    }

                });

Could it be a position setting issue? (my: "left top", at: "left", of: event, collision: "flipfit", within: $("#html-viewport"))

Thanks for your help.

Attachments (0)
Change History (2)

Changed November 27, 2013 01:25PM UTC by tj.vantoll comment:1

owner: → Sebastien_TraceParts
status: newpending

Hi Sebastien_TraceParts,

Thanks for taking the time to contribute to the jQuery UI project. Can you please provide a live example of this problem on either jsFiddle or jsBin?

You can use this as a starting point: http://jsfiddle.net/tj_vantoll/jCTEP/. Note that this example uses the latest code from the master branch of the git repo, and we have removed the need for

<a>
tags in menus. If you can create the issue using 1.10.3 that's fine too.

Thanks.

Changed December 12, 2013 08:48AM UTC by trac-o-bot comment:2

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!