swisnl / jQuery-contextMenu

jQuery contextMenu plugin & polyfill
https://swisnl.github.io/jQuery-contextMenu/
MIT License
2.25k stars 744 forks source link

preShow doesn't seem to be called #675

Open madprops opened 5 years ago

madprops commented 5 years ago

I'm doing something like

    $.contextMenu(
    {
        selector: "#header_radio_volume_controls",
        animation: {duration: 250, hide: 'fadeOut'},
        zIndex: 9000000000,
        className: 'volume_context',
        items: Hue.generate_volume_context_items(),
        events:
        {
            preShow: function(options)
            {
                console.log(1)
            }
        }
    })

The console.log never triggers.

If I change it to "show" it works.

Using version 2.7 (latest as of now).

bbrala commented 5 years ago

The preShow function has not been released yet, i'll release a new version soon.

fr0z3nfyr commented 5 years ago

There it is! @bbrala Please add a note on the documentation. I wasted about a half hour trying to figure this out before landing here.