Releases: swisnl/jQuery-contextMenu
Releases · swisnl/jQuery-contextMenu
2.6.4
Fixed
events.activatedis called withoutoptionsas argument (Issue #580).- LayerClick sometimes breaks when the source is not a mouseevent (Issue #132).
- The contextmenu now checks
visibleon items once instead of twice. Fixes issue 612. - Font awesome li height is now consistent again (Issue #610).
3.0.0-beta.1
Migrating
- To migrate, you only need to change all callback functions to the new arguments (
icon,build,visible,disabled, itemcallbackand global itemcallback). Also if you listen tocontextmenuevents, please check if you still get the correct data.
Changed
- Restructured the code to use Webpack with Babel. Build the code with
yarn run webpack. - Changed linting to ESLint.
- Moved to BrowserStack for browser testing.
- Added JSDoc for generated API documentation.
- Added 3.x documentation on GitHub pages.
- The previous
optandrootarguments are now described ascurrentMenuDataandrootMenuData, which are documented in ContextMenuData. - Defined a few callback types to illustrate the arguments with which they are called.
- Build callback ContextMenuBuildCallback is now
function(e, $currentTrigger). - Icon callback ContextMenuIconCallback is now
function(e, $item, key, item, currentMenuData, rootMenuData). - The visibile, disabled, global callback and item callback ContextMenuItemCallback is now
function(e, key, currentMenuData, rootMenuData). - If you define custom menu item types in
$.contextMenu.typesthey get called as ContextMenuItemTypeCallback withfunction(e, item, currentMenuData, rootMenuData). - All events should always include event data containing the ContextMenuData as described in ContextMenuEvent. So if you listen to
contextmenuevents you should always have the data available.
Fixed
- Add options argument to events.activates. (Issue #580)
- Fix support for
$(element).contextMenu('update')which was broken. - Fixed bug in checking visibility of items for menu visibility. If a menu item was defined as
{ item: { visible: false } }it would not stop the menu from showing.
2.6.3
2.6.2
2.6.1
Added
- Ability to define touchstart as trigger (thanks @npuser)
- Extra event
activatedthat triggers after the menu is activated (thanks @AliShahrivarian) - Flag denoting if a second trigger should close the menu (thanks @OliverColeman)
- Added update call to update visibility, disabled, icon and form value stats for items. Fixes issue (Issue #555).
$('.context-menu-one').contextMenu('update'); // update single menu
$.contextMenu('update') // update all open menusFixed
- Fix for out of bounds problem on window edges (thanks @AliShahrivarian)
2.5.0
2.4.5
Fixed
- ContextMenu appears with wrong position (Issue #502 thanks @apptaro
- Check if given selected value is a 0, if it is a zero so return it as is. Thanks @Falseee
- Events are never trigger when opening a contextMenu right after the other (Issue #454 thanks @kagant15
- Accesskey jQuery Modal Dialog not working (Issue #506 thanks @CiTRO33
- Fix submenu hover not always staying active if hovering over a submenu item. (Issue #523 thanks @tim-nz
- Change $node.click() to $node.get(0).click() to allow native event in HTML5 (Issue #517)
2.4.4
Fixed
- trigger is sometimes called on undefined objects because of typecheck on null. thanks @andreasrosdal
2.4.3
Changed
-
The inline style causes a Content Security Policy violation if style-src 'unsafe-inline' is not defined in the policy. PR 498 thanks @StealthDuck
-
Removed GPL license from the comment in the plugin. Was already removed everywhere else. Only MIT applies now.
Added
- Added SauceLabs tests for common browsers.
2.4.2
Fixed
- Focus not set on content editable element when right clicking the second time (Issue #482)
selectableSubMenubroke disabling click menu (fixes (Issue #493)