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

Custom hover disappears before you can mouse over into it #206998

Closed
connor4312 opened this issue Mar 6, 2024 · 6 comments · Fixed by #207051
Closed

Custom hover disappears before you can mouse over into it #206998

connor4312 opened this issue Mar 6, 2024 · 6 comments · Fixed by #207051
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member important Issue identified as high-priority insiders-released Patch has been released in VS Code Insiders verified Verification succeeded workbench-hover Hover issues in the workbench
Milestone

Comments

@connor4312
Copy link
Member

  1. Have a status bar contribution with an actionable tooltip, like Rust Analyzer's contribution in a repo with Rust code (like vscode) or Joh's PR pinger
  2. Hover over the status bar entry and try to move your mouse to interact with it
  3. It disappears 🐛

Image

@connor4312 connor4312 added bug Issue identified by VS Code Team member as probable bug workbench-hover Hover issues in the workbench important Issue identified as high-priority labels Mar 6, 2024
@Tyriar Tyriar self-assigned this Mar 6, 2024
@bpasero bpasero added the confirmed Issue has been confirmed by VS Code Team member label Mar 6, 2024
@bpasero
Copy link
Member

bpasero commented Mar 6, 2024

This seems like a recent regression to me because for the window zoom status entry this used to work recently.

@benibenj can you see if its maybe something you changed?

@bpasero bpasero added this to the March 2024 milestone Mar 6, 2024
@Tyriar
Copy link
Member

Tyriar commented Mar 6, 2024

Unless it's explicitly indicated as not hoverable any hover with markdown will allow it. I do notice hideOnHover is set to true in the new workbench hover delegate which is surprising to me, not sure why it wouldn't be using the default which is dynamically selected:

return this.hoverService.showHover({
...options,
...overrideOptions,
persistence: {
hideOnHover: true,
hideOnKeyDown: true,
...overrideOptions.persistence
},

@benibenj has been making a lot of hover changes recently.

@Tyriar
Copy link
Member

Tyriar commented Mar 6, 2024

@benibenj please cc me on workbench hover-related PRs so I can track changes going in. It's good you're taking some ownership but I just want to make sure I'm kept up to date 🙂

@alexandruavadanii
Copy link

alexandruavadanii commented Mar 6, 2024

So this is a bug. I noticed it a while ago and just got used to pressing and keeping Alt pressed (using Windows) to be able to click on things inside the hover.

@Tyriar
Copy link
Member

Tyriar commented Mar 6, 2024

@alexandruavadanii some hovers intentionally cannot be moused over so I'm glad you discovered alt 👍

@benibenj
Copy link
Contributor

benibenj commented Mar 7, 2024

Initially the new WorkbenchHoverDelegate was introduced to have a simple way to replace the native hover. Due to this it made sense to set hideOnHover: true to make sure the behaviour is similar to the native one.
It afterwards turned out that using the WorkbenchHoverDelegate was a nice way to clean up some of the existing custom hover code such as the one in the status bar.

It makes sense to switch back to the default behaviour for hideOnHover.

@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Mar 7, 2024
@rzhao271 rzhao271 added the verified Verification succeeded label Mar 26, 2024
@microsoft microsoft locked and limited conversation to collaborators Jun 10, 2024
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 confirmed Issue has been confirmed by VS Code Team member important Issue identified as high-priority insiders-released Patch has been released in VS Code Insiders verified Verification succeeded workbench-hover Hover issues in the workbench
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants