Skip to content

Commit

Permalink
Make the append/prepend make sense by clearing after popup. Bump ver.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGoddessInari committed Apr 3, 2020
1 parent 090afce commit 6b27ce0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "electron-contextmenu-wrapper",
"version": "4.0.1",
"version": "4.0.2",
"description": "Sane context menu handler",
"scripts": {
"doc": "esdoc -c ./esdoc.json",
Expand Down
4 changes: 3 additions & 1 deletion src/context-menu-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ class ContextMenuBuilder {
if (!menu) return;
this.menu = menu;
this.menu.popup({window: this.windowOrWebView});
contextMenuPrepends = [];
contextMenuAppends = [];
}

/**
Expand Down Expand Up @@ -413,7 +415,7 @@ class ContextMenuBuilder {

/**
* @param {String} menuType link, image, textinput, or text
* @param {MenuItem} menuItem
* @param {MenuItem} menuItem
*/
appendContextMenuItem(menuType, menuItem) {
contextMenuAppends.push({type: menuType, item: menuItem});
Expand Down

0 comments on commit 6b27ce0

Please sign in to comment.