diff options
author | Alex Dima <alexdima@microsoft.com> | 2016-05-09 15:33:53 +0300 |
---|---|---|
committer | Alex Dima <alexdima@microsoft.com> | 2016-05-09 15:33:53 +0300 |
commit | c212f0908f3d29933317bbc3233568fbca7944b1 (patch) | |
tree | d0d5932daa8a8298ea2c4c638da64cf215122c79 | |
parent | 957653954a359386045cabe6684b280414d6083d (diff) |
Fix issue #6081: Make sure to call in all cases delegate.onHide after the native context menu is shown1.1.0
-rw-r--r-- | src/vs/workbench/services/contextview/electron-browser/contextmenuService.ts | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/vs/workbench/services/contextview/electron-browser/contextmenuService.ts b/src/vs/workbench/services/contextview/electron-browser/contextmenuService.ts index f50127166a6..36904fb6586 100644 --- a/src/vs/workbench/services/contextview/electron-browser/contextmenuService.ts +++ b/src/vs/workbench/services/contextview/electron-browser/contextmenuService.ts @@ -77,21 +77,20 @@ export class ContextMenuService implements IContextMenuService { x = pos.x; y = pos.y; } - + let zoom = webFrame.getZoomFactor(); x *= zoom; y *= zoom; menu.popup(remote.getCurrentWindow(), Math.floor(x), Math.floor(y)); + if (delegate.onHide) { + delegate.onHide(undefined); + } }); }); } private runAction(actionToRun: IAction, delegate: IContextMenuDelegate): void { - if (delegate.onHide) { - delegate.onHide(false); - } - this.telemetryService.publicLog('workbenchActionExecuted', { id: actionToRun.id, from: 'contextMenu' }); const context = delegate.getActionsContext ? delegate.getActionsContext() : null; |