Skip to content

Commit

Permalink
aux window - fix regression when dropping over window location (#198529)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Nov 17, 2023
1 parent 2d424c7 commit 77da82c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/vs/workbench/browser/parts/editor/editorTabsControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,10 @@ export abstract class EditorTabsControl extends Themable implements IEditorTabsC
protected async maybeCreateAuxiliaryEditorPartAt(e: DragEvent, offsetElement: HTMLElement): Promise<IAuxiliaryEditorPart | undefined> {
const { point, display } = await this.hostService.getCursorScreenPoint() ?? { point: { x: e.screenX, y: e.screenY } };
const window = getWindow(e);
if (point.x >= window.screenX && point.x <= window.screenX + window.outerWidth && point.y >= window.screenY && point.y <= window.screenY + window.outerHeight) {
return; // refuse to create as long as the mouse was released over main window to reduce chance of opening by accident
if (window.document.visibilityState === 'visible') {
if (point.x >= window.screenX && point.x <= window.screenX + window.outerWidth && point.y >= window.screenY && point.y <= window.screenY + window.outerHeight) {
return; // refuse to create as long as the mouse was released over main window to reduce chance of opening by accident
}
}

const offsetX = offsetElement.offsetWidth / 2;
Expand Down

0 comments on commit 77da82c

Please sign in to comment.