Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hover message hides when trying to move the mouse to it using overflowWidgetsDomNode #2156

Closed
pankajk07 opened this issue Sep 25, 2020 · 4 comments · Fixed by microsoft/vscode#142160
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-hover
Milestone

Comments

@pankajk07
Copy link
Contributor

  1. Go Monaco playground
  2. Add the code snippet attached below
  3. Hover over function name hello
  4. Move the mouse to the popover
  5. The popover disappears

Expectation:
The popover should not disappear when the mouse moves to it

monaco-editor version: 0.21.1
Browser: Chrome
OS: MacOS
Playground code that reproduces the issue:

monaco.editor.create(document.getElementById("container"), {
    language: "javascript",
    overflowWidgetsDomNode: document.querySelector('body'),
    fixedOverflowWidgets: true,
    value: `
/**
 * sample doc
 */
function hello() {
	alert('Hello world!');
}`
});
document.querySelector('body').classList.add('monaco-editor');
@alexdima
Copy link
Member

alexdima commented Sep 25, 2020

The hover listens to mouse events from the editor, and since it is now rooted via overflowWidgetsDomNode outside the editor, it does not receive the editor mouse events anymore.

@alexdima alexdima added the bug Issue identified by VS Code Team member as probable bug label Sep 25, 2020
@alexdima alexdima self-assigned this Sep 25, 2020
@AndersMad
Copy link

on another (old) note - I was hoping overflowWidgetsDomNode would solve this: #70 - but the "F1 Command Palette" is still not useable in small editors.

@alexdima alexdima changed the title Hover message hides when trying to move the mouse to it Hover message hides when trying to move the mouse to it using overflowWidgetsDomNode Jan 28, 2021
@blutorange
Copy link
Contributor

Related issue and probably caused by the same event-handling cause is that pressing F2 to rename a symbol does not work either -- the rename overflow widget appears but immediately disappears again (Chrome 92.0.4515.107)

@mifopen
Copy link

mifopen commented Feb 2, 2022

@alexdima I've seen that you've been refactoring this part a lot during the last weeks. Does it make sense for me to repeat that exact solution from @lengthmin in another PR?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug editor-hover
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants