Underline hyperlink on hover, even if not focused #11678

Closed
opened 2026-01-31 02:54:29 +00:00 by claunia · 6 comments
Owner

Originally created by @KalleOlaviNiemitalo on GitHub (Dec 3, 2020).

Description of the new feature/enhancement

I'd like Windows Terminal to underline the hyperlink on which I hover the mouse pointer, even if the pane and the Windows Terminal window do not have the focus. This would feel more consistent because a single Ctrl+click already suffices to open the hyperlink regardless of where the focus is.

I suppose it should then show the tool tip as well.

Originally created by @KalleOlaviNiemitalo on GitHub (Dec 3, 2020). # Description of the new feature/enhancement I'd like Windows Terminal to underline the hyperlink on which I hover the mouse pointer, even if the pane and the Windows Terminal window do not have the focus. This would feel more consistent because a single Ctrl+click already suffices to open the hyperlink regardless of where the focus is. I suppose it should then show the tool tip as well.
Author
Owner

@zadjii-msft commented on GitHub (Dec 3, 2020):

Huh, I don't think we're doing any special logic if the control is focused or not. WE might not get mouse events at all if the control isn't focused 😕

There might be a way to tell XAML to give us the events though, we'll need to investigate.

@zadjii-msft commented on GitHub (Dec 3, 2020): Huh, I don't think we're doing any special logic if the control is focused or not. WE might not get mouse events _at all_ if the control isn't focused 😕 There might be a way to tell XAML to give us the events though, we'll need to investigate.
Author
Owner

@Don-Vito commented on GitHub (Dec 3, 2020):

@zadjii-msft - not sure if it is related, but:

 void TermControl::_PointerMovedHandler(Windows::Foundation::IInspectable const& /*sender*/,
                                           Input::PointerRoutedEventArgs const& args)
{
...
        if (!_focused)
        {
            args.Handled(true);
            return;
        }
...
}

I can take a look if it helps

@Don-Vito commented on GitHub (Dec 3, 2020): @zadjii-msft - not sure if it is related, but: ``` void TermControl::_PointerMovedHandler(Windows::Foundation::IInspectable const& /*sender*/, Input::PointerRoutedEventArgs const& args) { ... if (!_focused) { args.Handled(true); return; } ... } ``` I can take a look if it helps
Author
Owner

@zadjii-msft commented on GitHub (Dec 3, 2020):

🤦‍♂️

Well that's on me for triaging at 4:30am without coffee. Thanks!

@zadjii-msft commented on GitHub (Dec 3, 2020): 🤦‍♂️ Well that's on me for triaging at 4:30am without coffee. Thanks!
Author
Owner

@PhMajerus commented on GitHub (Dec 13, 2020):

Related, if a hyperlink is highlighted because of a mouse hover, and user alt-tab to activate another app, the hyperlink will stay in that state regardless of mouse position until Terminal receives the focus again.

I agree with @KalleOlaviNiemitalo that hyperlinks should still react to mouse hover when Terminal doesn't have the focus as it would be consistent with the hover behavior of all GDI common controls since Windows 98, but if the current behavior is to be kept for performance reasons or something, all hyperlinks should return to non-highlighted state when Terminal loses the focus.

@PhMajerus commented on GitHub (Dec 13, 2020): Related, if a hyperlink is highlighted because of a mouse hover, and user alt-tab to activate another app, the hyperlink will stay in that state regardless of mouse position until Terminal receives the focus again. I agree with @KalleOlaviNiemitalo that hyperlinks should still react to mouse hover when Terminal doesn't have the focus as it would be consistent with the hover behavior of all GDI common controls since Windows 98, but if the current behavior is to be kept for performance reasons or something, all hyperlinks should return to non-highlighted state when Terminal loses the focus.
Author
Owner

@KalleOlaviNiemitalo commented on GitHub (Dec 14, 2020):

If I start selecting text with the mouse in Windows Terminal, and Alt+Tab to a different window while keeping the mouse button down, then the selection no longer reacts to the position of the mouse cursor; but if I Alt+Tab back to Windows Terminal without having released the mouse button, then the selection starts reacting again. I presume this is a consequence of the previously quoted source code.

@KalleOlaviNiemitalo commented on GitHub (Dec 14, 2020): If I start selecting text with the mouse in Windows Terminal, and Alt+Tab to a different window while keeping the mouse button down, then the selection no longer reacts to the position of the mouse cursor; but if I Alt+Tab back to Windows Terminal without having released the mouse button, then the selection starts reacting again. I presume this is a consequence of the previously quoted source code.
Author
Owner

@ghost commented on GitHub (Jan 28, 2021):

:tada:This issue was addressed in #8615, which has now been successfully released as Windows Terminal Preview v1.6.10272.0.🎉

Handy links:

@ghost commented on GitHub (Jan 28, 2021): :tada:This issue was addressed in #8615, which has now been successfully released as `Windows Terminal Preview v1.6.10272.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.6.10272.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11678