Hyperlink tooltips are flaky, don't always appear #15843

Open
opened 2026-01-31 04:50:08 +00:00 by claunia · 7 comments
Owner

Originally created by @DHowett on GitHub (Nov 11, 2021).

One more random data point in case someone finds it useful: I seem to be in an in-between world where sometimes it works and sometimes it doesn't. It seems that if I move the mouse in from the left side of the screen on the same line as the link, I usually get no tooltip. If the mouse comes from the bottom (or otherwise goes over non-link text) before hitting the link, I do get the tooltip. Even coming from the left, I still get it maybe 10% of the time (estimated).

from @zb140

Originally created by @DHowett on GitHub (Nov 11, 2021). > One more random data point in case someone finds it useful: I seem to be in an in-between world where sometimes it works and sometimes it doesn't. It seems that if I move the mouse in from the left side of the screen on the same line as the link, I usually get no tooltip. If the mouse comes from the bottom (or otherwise goes over _non_-link text) before hitting the link, I do get the tooltip. Even coming from the left, I still get it maybe 10% of the time (estimated). > > _from @zb140_
Author
Owner

@elsaco commented on GitHub (Nov 11, 2021):

@DHowett isn't that escape code valid in PS7 only? Does not work with PS6 or older.

Sample PS7 screenshot:
pwsh_link_test

@elsaco commented on GitHub (Nov 11, 2021): @DHowett isn't that escape code valid in PS7 only? Does not work with PS6 or older. Sample PS7 screenshot: ![pwsh_link_test](https://user-images.githubusercontent.com/3933920/141348494-56f68483-7443-41d5-93c9-aad4e3e2b53e.png)
Author
Owner

@DHowett commented on GitHub (Nov 11, 2021):

Yes, it is valid in the only versions of PowerShell that matter.

Interesting that it works for you! Maybe this is a Windows build issue instead of a Terminal issue...

@DHowett commented on GitHub (Nov 11, 2021): Yes, it is valid in the only versions of PowerShell that matter. Interesting that it works for you! Maybe this is a Windows build issue instead of a Terminal issue...
Author
Owner

@zadjii-msft commented on GitHub (Nov 11, 2021):

image

I bet it's a DPI issue

@zadjii-msft commented on GitHub (Nov 11, 2021): ![image](https://user-images.githubusercontent.com/18356694/141350826-5a0d2633-bad3-4695-b905-11e55342394a.png) I bet it's a DPI issue
Author
Owner

@zb140 commented on GitHub (Nov 11, 2021):

One more random data point in case someone finds it useful: I seem to be in an in-between world where sometimes it works and sometimes it doesn't. It seems that if I move the mouse in from the left side of the screen on the same line as the link, I usually get no tooltip. If the mouse comes from the bottom (or otherwise goes over non-link text) before hitting the link, I do get the tooltip. Even coming from the left, I still get it maybe 10% of the time (estimated).

@zb140 commented on GitHub (Nov 11, 2021): One more random data point in case someone finds it useful: I seem to be in an in-between world where sometimes it works and sometimes it doesn't. It seems that if I move the mouse in from the left side of the screen on the same line as the link, I usually get no tooltip. If the mouse comes from the bottom (or otherwise goes over _non_-link text) before hitting the link, I do get the tooltip. Even coming from the left, I still get it maybe 10% of the time (estimated).
Author
Owner

@DHowett commented on GitHub (Nov 11, 2021):

Huh, you're right. If I keep re-aiming and trying again, it works. I'm going to repurpose this bug...

@DHowett commented on GitHub (Nov 11, 2021): Huh, you're right. If I keep re-aiming and trying again, it works. I'm going to repurpose this bug...
Author
Owner

@PankajBhojwani commented on GitHub (Nov 12, 2021):

So the reason for this is that the invisible border we create to 'house' the tooltip is only the size of 1 cell, so unless your cursor is exactly on that 1 cell you won't get the tooltip. Here's a more detailed overview of the process:

  1. Cursor moves to the link
  2. We immediately create the 1-cell size border with the tooltip, and place the border on the cell the cursor is on
  3. Cursor moves to another part of the link (without moving 'out' of the link) - we don't move the border again because the cursor has remained on the same link
  4. No tooltip because the cursor isn't on that exact cell with the border

Possible solutions would be

  • Make the border cover the entire link
    • This would probably be the ideal solution, but implementation wise its clunky because links that span multiple lines will need multiple borders
  • Move the 1-cell size border even when the cursor is moving within the same link

TL;DR: If you stop your cursor immediately upon hitting the link, you will get the tooltip

@PankajBhojwani commented on GitHub (Nov 12, 2021): So the reason for this is that the invisible border we create to 'house' the tooltip is only the size of 1 cell, so unless your cursor is exactly on that 1 cell you won't get the tooltip. Here's a more detailed overview of the process: 1. Cursor moves to the link 2. We immediately create the 1-cell size border with the tooltip, and place the border on the cell the cursor is on 3. Cursor moves to another part of the link (without moving 'out' of the link) - we don't move the border again because the cursor has remained on the same link 4. No tooltip because the cursor isn't on that exact cell with the border Possible solutions would be - Make the border cover the entire link - This would probably be the ideal solution, but implementation wise its clunky because links that span multiple lines will need multiple borders - Move the 1-cell size border even when the cursor is moving within the same link **TL;DR:** If you stop your cursor immediately upon hitting the link, you will get the tooltip
Author
Owner

@DHowett commented on GitHub (Nov 12, 2021):

Hmmm. Maybe another possible solution would be to switch to manual tooltip presentation like @zadjii-msft implemented in #11680.

@DHowett commented on GitHub (Nov 12, 2021): Hmmm. Maybe another possible solution would be to switch to manual tooltip presentation like @zadjii-msft implemented in #11680.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15843