This commit is contained in:
SteVen Batten 2019-07-30 16:18:42 -07:00
parent ce15ecb0d5
commit 1cee9f7dfb
2 changed files with 5 additions and 1 deletions

View file

@ -74,7 +74,7 @@ export class LightBulbWidget extends Disposable implements IContentWidget {
// Make sure that focus / cursor location is not lost when clicking widget icon
this._editor.focus();
dom.EventHelper.stop(e, true);
e.preventDefault();
// a bit of extra work to make sure the menu
// doesn't cover the line-text
const { top, height } = dom.getDomNodePagePosition(this._domNode);

View file

@ -85,6 +85,10 @@ export class ContextMenuHandler {
menu.onDidBlur(() => this.contextViewService.hideContextView(true), null, menuDisposables);
domEvent(window, EventType.BLUR)(() => { this.contextViewService.hideContextView(true); }, null, menuDisposables);
domEvent(window, EventType.MOUSE_DOWN)((e: MouseEvent) => {
if (e.defaultPrevented) {
return;
}
let event = new StandardMouseEvent(e);
let element: HTMLElement | null = event.target;