Revert "Merge from vscode ada4bddb8edc69eea6ebaaa0e88c5f903cbd43d8 (#5529)" (#5553)

This reverts commit 5d44b6a6a7.
This commit is contained in:
Anthony Dresser
2019-05-20 17:07:32 -07:00
committed by GitHub
parent 1315b8e42a
commit c9a4f8f664
325 changed files with 3332 additions and 4501 deletions

View File

@@ -132,13 +132,13 @@ export class ContextView extends Disposable {
ContextView.BUBBLE_UP_EVENTS.forEach(event => {
toDisposeOnSetContainer.push(DOM.addStandardDisposableListener(this.container!, event, (e: Event) => {
this.onDOMEvent(e, false);
this.onDOMEvent(e, <HTMLElement>document.activeElement, false);
}));
});
ContextView.BUBBLE_DOWN_EVENTS.forEach(event => {
toDisposeOnSetContainer.push(DOM.addStandardDisposableListener(this.container!, event, (e: Event) => {
this.onDOMEvent(e, true);
this.onDOMEvent(e, <HTMLElement>document.activeElement, true);
}, true));
});
@@ -213,11 +213,13 @@ export class ContextView extends Disposable {
height: elementPosition.height
};
} else {
let realAnchor = <IAnchor>anchor;
around = {
top: anchor.y,
left: anchor.x,
width: anchor.width || 1,
height: anchor.height || 2
top: realAnchor.y,
left: realAnchor.x,
width: realAnchor.width || 1,
height: realAnchor.height || 2
};
}
@@ -276,7 +278,7 @@ export class ContextView extends Disposable {
return !!this.delegate;
}
private onDOMEvent(e: Event, onCapture: boolean): void {
private onDOMEvent(e: Event, element: HTMLElement, onCapture: boolean): void {
if (this.delegate) {
if (this.delegate.onDOMEvent) {
this.delegate.onDOMEvent(e, <HTMLElement>document.activeElement);