Skip to content

Commit 77da82c

Browse files
authored
aux window - fix regression when dropping over window location (#198529)
1 parent 2d424c7 commit 77da82c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/vs/workbench/browser/parts/editor/editorTabsControl.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,10 @@ export abstract class EditorTabsControl extends Themable implements IEditorTabsC
333333
protected async maybeCreateAuxiliaryEditorPartAt(e: DragEvent, offsetElement: HTMLElement): Promise<IAuxiliaryEditorPart | undefined> {
334334
const { point, display } = await this.hostService.getCursorScreenPoint() ?? { point: { x: e.screenX, y: e.screenY } };
335335
const window = getWindow(e);
336-
if (point.x >= window.screenX && point.x <= window.screenX + window.outerWidth && point.y >= window.screenY && point.y <= window.screenY + window.outerHeight) {
337-
return; // refuse to create as long as the mouse was released over main window to reduce chance of opening by accident
336+
if (window.document.visibilityState === 'visible') {
337+
if (point.x >= window.screenX && point.x <= window.screenX + window.outerWidth && point.y >= window.screenY && point.y <= window.screenY + window.outerHeight) {
338+
return; // refuse to create as long as the mouse was released over main window to reduce chance of opening by accident
339+
}
338340
}
339341

340342
const offsetX = offsetElement.offsetWidth / 2;

0 commit comments

Comments
 (0)