Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@NriotHrreion
Copy link
Contributor

@NriotHrreion NriotHrreion commented Feb 19, 2024

fix #184740
fix #205353

Description

This is a brief explanation of the changes.

The original code

const top = Math.min(...targetBounds.map(e => e.top));
const right = Math.max(...targetBounds.map(e => e.right));
const bottom = Math.max(...targetBounds.map(e => e.bottom));
const left = Math.min(...targetBounds.map(e => e.left));

will select a bound like this:

屏幕截图 2024-02-19 093414

which will position the hover widget at the top-left corner of the bound. And this will make the link in the widget impossible to reach for the mouse.

The changed code

const { top, right, bottom, left } = targetBounds[0];

will select a bound like this:

屏幕截图 2024-02-19 094124

which makes the widget reachable.

Effect

Before

image

After

image

Tyriar
Tyriar previously approved these changes Feb 23, 2024
Copy link
Member

@Tyriar Tyriar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@Tyriar Tyriar added this to the March 2024 milestone Feb 23, 2024
@Tyriar Tyriar enabled auto-merge February 23, 2024 19:47
@Tyriar Tyriar closed this Feb 23, 2024
auto-merge was automatically disabled February 23, 2024 22:06

Pull request was closed

@Tyriar Tyriar reopened this Feb 23, 2024
@Tyriar Tyriar enabled auto-merge February 23, 2024 22:06
@Tyriar Tyriar merged commit 1e07343 into microsoft:main Feb 23, 2024
@NriotHrreion NriotHrreion deleted the fix-205353 branch February 24, 2024 01:40
@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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't hover over "Follow link" It's possible for terminal link hovers to be put in unhoverable locations

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.