Skip to content
This repository was archived by the owner on Aug 14, 2021. It is now read-only.
This repository was archived by the owner on Aug 14, 2021. It is now read-only.

Cannot access "extraData" in "select()" callback #114

Closed
@jnbarchan

Description

@jnbarchan

An external framework is sending me a "right-click" event. I therefore use programmatic contextmenu("open", event, extraData) to open the context menu. I need to pass the framework's object through to the contextmenu's callbacks. This works in the beforeOpen() handler, but not in the select() handler, which I need. Is this a "bug" or an "enhancement" or what is the intended behaviour?

Skeleton:

frameworkObject.onRightClick(event)
{
  $(document).contextmenu("open", event, { mydata: this; });
}

contextMenu = {
  beforeOpen: function (event, ui)
  {
    // ui.extraData.mydata is nicely available here
  },

  select: function (event, ui)
  {
    // ui.extraData is **not** available here
    // ui.item.data() does not help here either
  }
}

If it makes any difference, I am using IE 11.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions