Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jQuery second contextMenu don't show properly #238

Closed
germanmartin opened this issue Dec 5, 2014 · 9 comments
Closed

jQuery second contextMenu don't show properly #238

germanmartin opened this issue Dec 5, 2014 · 9 comments
Labels

Comments

@germanmartin
Copy link

I have a big div (the blue one) with a ContextMenu and inside another div (green one) with another contextmenu. Both contextmenu shows with right click.

If I make a right clic in the blue div the ContextMenu shows fine. But when I clic in the green div still appears the old contextmenu. If I refresh the page and just clic in the green div, it shows the correct contextMenu.

I made this example http://jsfiddle.net/german_martin/oprkvys1/ of my problem.

ITEM 1
<div class="SingleItem">ITEM 2</div> 
<div class="SingleItem">ITEM 3</div> 
</div>

$(document).ready(function () {

$.contextMenu({
    selector: '.CuadroFondo',
    callback: function (key, options) {

        if (key == "expand") {
            alert("expand");
        }

        if (key == "creargrupo") {
            alert("creargrupo");
        }

        if (key == "seguridadgrupo") {
            alert("jejeje")
        }

    },
    items: {
        "expand": { name: "Irak", icon: "add-expand" },
        "sep1": "--MAIN MENU--",
        "creargrupo": { name: "Afganistan", icon: "crearnuevo" },


    }
});


$.contextMenu({
    selector: '.SingleItem',
    callback: function (key, options) {

        if (key == "expand") {
            alert("expand");
        }

        if (key == "creargrupo") {
            alert("creargrupo");
        }

        if (key == "seguridadgrupo") {
            alert("jejeje")
        }

    },
    items: {
        "expand": { name: "Miami", icon: "add-expand" },
        "sep1": "--SUBMENU--",
        "seguridadgrupo": { name: "Florida", icon: "seguridad" }

    }
});

})

@germanmartin
Copy link
Author

Can anyone help me with this issue?

@azza0091
Copy link

same problem for me... could anyone solve this please? is really annoying...

@bbrala
Copy link
Member

bbrala commented Aug 18, 2015

Hmm pretty interesting, it seems it is broken only until you click to close the menu and open it again.

http://jsfiddle.net/oprkvys1/2/

Reproducable, so i should be able to fix this.

@bbrala bbrala added the Bug label Aug 18, 2015
@germanmartin
Copy link
Author

Hi! With your example ( http://jsfiddle.net/oprkvys1/2/ ) I have the same problem.

=(

@bbrala
Copy link
Member

bbrala commented Aug 18, 2015

Yeah was just checking if I could reproduce the problem. :)

@germanmartin
Copy link
Author

Great, thanks for your check!

@bbrala
Copy link
Member

bbrala commented Oct 12, 2015

I thin k this had been fixed, i cannot reproduce anymore in: http://jsfiddle.net/oprkvys1/3/

@bbrala bbrala closed this as completed Oct 12, 2015
@germanmartin
Copy link
Author

This is not fixed.
Try it: http://jsfiddle.net/oprkvys1/3/

  1. Make right clic in the green square and you will get "Miami Florida"
  2. Make right clic outside (in blue background) and you will get "Irak Afganistan"
  3. Then right make clic in the green square again and you will NOT get "Miami Florida", you will get "Irak Afganistan"

@germanmartin
Copy link
Author

Thank you!! It works using reposition:false,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants