microsoft / microsoft/monaco-editor
[Bug] HoverProvider does not work inside of Webcomponent (ShadowRoot)
Open
@aiday-mar is already working on this.
Since Mar 14, 2023.
blocked
bug
editor-hover
editor-shadow-dom
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
Description
Reproducible in vscode.dev or in VS Code Desktop?
- Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
- Not reproducible in the monaco editor playground
Monaco Editor Playground Code
No response
Reproduction Steps
Host the Monacod Editor inside of a WebComponents ShadowRoot, then the hoverProvider does not work.
Actual (Problematic) Behavior
It is cause of this code:

It will raise the mouseLeave, cause the m.target is the dom node the component is hosted in.
Expected Behavior
hoverProvider should work
I think it should be solved using smth like
m.composedPath()[0] instead of m.target
for the check
Additional Context
No response
Edit by @hediet:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.