From e7b94a97d5d02627902f799ca997c938dc8fdca5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9C=A0=ED=98=95=EC=B2=A0?= Date: Tue, 28 Nov 2023 17:09:01 +0900 Subject: [PATCH] =?UTF-8?q?AC2-1824=20shadow=20dom=20=EB=B2=84=EA=B7=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/vs/editor/browser/controller/mouseHandler.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/browser/controller/mouseHandler.ts b/src/vs/editor/browser/controller/mouseHandler.ts index e4551a39cbe5b..edc8ccd4b8009 100644 --- a/src/vs/editor/browser/controller/mouseHandler.ts +++ b/src/vs/editor/browser/controller/mouseHandler.ts @@ -99,7 +99,10 @@ export class MouseHandler extends ViewEventHandler { if (!this._mouseLeaveMonitor) { this._mouseLeaveMonitor = dom.addDisposableListener(this.viewHelper.viewDomNode.ownerDocument, 'mousemove', (e) => { - if (!this.viewHelper.viewDomNode.contains(e.target as Node | null)) { + const viewRoot = this.viewHelper.viewDomNode.getRootNode() as ShadowRoot | Document; + const viewRootIsShadowRoot = viewRoot instanceof ShadowRoot; + + if (!this.viewHelper.viewDomNode.contains(e.composedPath()[0] as Node | null) && !viewRootIsShadowRoot) { // went outside the editor! this._onMouseLeave(new EditorMouseEvent(e, false, this.viewHelper.viewDomNode)); }