Active terminal does not get focus when window gets focus #764

Closed
opened 2026-01-30 22:02:51 +00:00 by claunia · 13 comments
Owner

Originally created by @patriksvensson on GitHub (May 7, 2019).

Your Windows build number:
10.0.18362.86

What you're doing and what's happening:

  1. Open Windows Terminal
  2. Start PowerShell console.
  3. Make sure that the window have lost focus
  4. Click on the window to focus the application
  5. Start writing
  6. Input is not sent to the active console

What's wrong / what should be happening instead:
Input should be sent to the active console.

Originally created by @patriksvensson on GitHub (May 7, 2019). **Your Windows build number:** 10.0.18362.86 **What you're doing and what's happening:** 1. Open Windows Terminal 2. Start PowerShell console. 2. Make sure that the window have lost focus 3. Click on the window to focus the application 4. Start writing 5. Input is not sent to the active console **What's wrong / what should be happening instead:** Input should be sent to the active console.
Author
Owner

@zadjii-msft commented on GitHub (May 7, 2019):

Where specifically are you clicking to focus the window?

I'm seeing that clicking in the main part of the terminal window (with the text) works to send focus, but clicking anywhere in the tab row does not focus the terminal control

@zadjii-msft commented on GitHub (May 7, 2019): Where _specifically_ are you clicking to focus the window? I'm seeing that clicking in the main part of the terminal window (with the text) works to send focus, but clicking anywhere in the tab row does _not_ focus the terminal control
Author
Owner

@patriksvensson commented on GitHub (May 7, 2019):

@zadjii-msft Yes. I realized it only occurs when clicking the tab row. However, is this by design?

Btw, before I forget; I really love what you're doing with this project! The Windows Terminal is super fast!

@patriksvensson commented on GitHub (May 7, 2019): @zadjii-msft Yes. I realized it only occurs when clicking the tab row. However, is this by design? Btw, before I forget; I really love what you're doing with this project! The Windows Terminal is super fast!
Author
Owner

@zadjii-msft commented on GitHub (May 7, 2019):

That's good to know! Makes fixing it a lot easier. It's definitely not by design, I just need to know what UI element we need to eat the focus from :P

Thanks for the kind words! We're really happy to be able to make this for the community (and ourselves :P)

@zadjii-msft commented on GitHub (May 7, 2019): That's good to know! Makes fixing it a lot easier. It's definitely not by design, I just need to know what UI element we need to eat the focus from :P Thanks for the kind words! We're really happy to be able to make this for the community (and ourselves :P)
Author
Owner

@carlos-zamora commented on GitHub (May 10, 2019):

Found a few scenarios to lose focus (I suspect these to be basically the same problem):

  1. Clicking tabs:
    • Repro:
      • Open a tab w/ CTRL+T (focus should be ok for now)
      • Click on the tab you're using (focus should be lost)
    • Interestingly, if you then press the left arrow key, you switch to the tab on the left. BUT, if you press the left arrow key again, you are now moving around in the terminal control for the tab you just focused on.
  2. Clicking the drop-down menu:
    • Repro:
      • Click drop-down menu (focus is now on menu. Arrow keys let you explore that. Typing does not go to term control [bug?])
      • Click drop-down menu again to close it (focus is now stuck in tab control again. Same as extra bullet point in scenario 1)
@carlos-zamora commented on GitHub (May 10, 2019): Found a few scenarios to lose focus (I suspect these to be basically the same problem): 1. Clicking tabs: - Repro: - Open a tab w/ CTRL+T (focus should be ok for now) - Click on the tab you're using (focus should be lost) - Interestingly, if you then press the left arrow key, you switch to the tab on the left. BUT, if you press the left arrow key again, you are now moving around in the terminal control for the tab you just focused on. 2. Clicking the drop-down menu: - Repro: - Click drop-down menu (focus is now on menu. Arrow keys let you explore that. Typing does not go to term control [bug?]) - Click drop-down menu again to close it (focus is now stuck in tab control again. Same as extra bullet point in scenario 1)
Author
Owner

@danielniccoli commented on GitHub (Nov 11, 2019):

This also happens with

Windows build number: 10.0.19018.0
Windows Terminal version (if applicable): 0.6.2951.0

When the Terminal regains focus by either clicking the title bar, any tab or the app icon in the task bar, then only the window is focused, not the active terminal, preventing you to type text into it.

@danielniccoli commented on GitHub (Nov 11, 2019): This also happens with ``` Windows build number: 10.0.19018.0 Windows Terminal version (if applicable): 0.6.2951.0 ``` When the Terminal regains focus by either clicking the title bar, any tab or the app icon in the task bar, then only the window is focused, not the active terminal, preventing you to type text into it.
Author
Owner

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

Hey wadda ya know, this might just be related to #1205, which I just started on this morning. I'll make sure to include these scenarios in my investigations.

@zadjii-msft commented on GitHub (Nov 11, 2019): Hey wadda ya know, this might just be related to #1205, which I just started on this morning. I'll make sure to include these scenarios in my investigations.
Author
Owner

@khowling commented on GitHub (Nov 13, 2019):

Moved to Windows terminal this week, loving it, but this is my biggest user-experience issue. I need to retrain my brain. Windows has trained me the safe way to focus any command window is by clicking the title-bar then the cursor will be in the correct place so i can type. I've typed so many characters into the ether this week

@khowling commented on GitHub (Nov 13, 2019): Moved to Windows terminal this week, loving it, but this is my biggest user-experience issue. I need to retrain my brain. Windows has trained me the safe way to focus any command window is by clicking the title-bar then the cursor will be in the correct place so i can type. I've typed so many characters into the ether this week
Author
Owner

@ghost commented on GitHub (Nov 26, 2019):

:tada:This issue was addressed in #3540, which has now been successfully released as Windows Terminal Preview v0.7.3291.0.🎉

Handy links:

@ghost commented on GitHub (Nov 26, 2019): :tada:This issue was addressed in #3540, which has now been successfully released as `Windows Terminal Preview v0.7.3291.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v0.7.3291.0) * [Store Download](https://www.microsoft.com/store/apps/9n0dx20hk701?cid=storebadge&ocid=badge)
Author
Owner

@nickcano commented on GitHub (Jan 5, 2020):

I'm still experiencing this issue. Exactly as described here and in #3609. Just switched to terminal hoping to make it my main, but this is really messing with me. My version:

Windows Terminal (Preview)
Version: 0.7.3451.0

I'm on 1903 (Build 18362.535)

@nickcano commented on GitHub (Jan 5, 2020): I'm still experiencing this issue. Exactly as described here and in #3609. Just switched to terminal hoping to make it my main, but this is really messing with me. My version: ``` Windows Terminal (Preview) Version: 0.7.3451.0 ``` I'm on 1903 (Build 18362.535)
Author
Owner

@DJackman123 commented on GitHub (Jan 7, 2020):

Confirming that it's still happening for me as well. Looks like issue #3609 is still open and addressing this problem.

@DJackman123 commented on GitHub (Jan 7, 2020): Confirming that it's still happening for me as well. Looks like issue #3609 is still open and addressing this problem.
Author
Owner

@KuroshM commented on GitHub (Oct 17, 2022):

I have version 1.15.2712.0 and opening a new tab (Ctrl+Shift+T ) does not gain focus until clicked on the window area.

@KuroshM commented on GitHub (Oct 17, 2022): I have version 1.15.2712.0 and opening a new tab (Ctrl+Shift+T ) does not gain focus until clicked on the window area.
Author
Owner

@charliefortner commented on GitHub (Nov 1, 2022):

Problem persists in version 1.15.2874.0
I launch Terminal from Start Menu and then must click the window for it to gain focus. I've tried Alt+Tab to switch away and then back to the Terminal window, but it still won't get focus so I can type.

@charliefortner commented on GitHub (Nov 1, 2022): Problem persists in version 1.15.2874.0 I launch Terminal from Start Menu and then must click the window for it to gain focus. I've tried Alt+Tab to switch away and then back to the Terminal window, but it still won't get focus so I can type.
Author
Owner

@zadjii-msft commented on GitHub (Nov 2, 2022):

If you're seeing this on 1.15+, you're probably seeing #13388, not this thread. I'm gonna lock this thread as out-of-date. The root cause here was addressed a couple years ago. Let's track the new regression in the new thread. Thanks!

@zadjii-msft commented on GitHub (Nov 2, 2022): If you're seeing this on 1.15+, you're probably seeing #13388, not this thread. I'm gonna lock this thread as out-of-date. The root cause here was addressed a couple years ago. Let's track the new regression in the new thread. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#764