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

Focus starts on titlebar when opening a profile from a nested dropdown entry #15049

Closed
kkostrzewa-coupa opened this issue Mar 27, 2023 · 4 comments · Fixed by #15077
Closed
Labels
Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. In-PR This issue has a related PR Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-2 A description (P2) Product-Terminal The new Windows Terminal.

Comments

@kkostrzewa-coupa
Copy link

Windows Terminal version

1.17.1023

Windows build number

10.0.19045.0

Other Software

No response

Steps to reproduce

Adding a profile like this in wt 1.16.10261.0 starts the profile with keyboard focus on the command shell

When I use the preview version, focus is on the titlebar, so I have to tab 2x to switch to the command shell

            {
                "commandline": "ssh -i \"%USERPROFILE%\\.ssh\\my-super-secret-key.pem\" ec2-user@10.161.0.101",
                "experimental.retroTerminalEffect": true,
                "guid": "{8e690e45-db6d-47c5-919a-68a86077f9dd}",
                "hidden": false,
                "name": "ec2:kpk-my-super-awesome-ec2-name",
                "suppressApplicationTitle": true
            }

I am using the fabulous new folders feature

        {
            "type": "folder",
            "name": "ssh",
            "entries": [
                {
                    "profile": "ec2:kpk-my-super-awesome-ec2-name",
                    "type": "profile"
                }
            ]
        }

Expected Behavior

focus in command shell

Actual Behavior

focus in titlebar

@kkostrzewa-coupa kkostrzewa-coupa added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Mar 27, 2023
@kkostrzewa-coupa
Copy link
Author

This appears to be a side effect of using folders. When I remove the folder entry from newTabMenu, focus starts in the shell.

@zadjii-msft
Copy link
Member

INTERESTING

I can totally repro this. That's wild!

Thanks for the report!

@zadjii-msft zadjii-msft added Help Wanted We encourage anyone to jump in on these. Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Product-Terminal The new Windows Terminal. Priority-2 A description (P2) and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Mar 27, 2023
@zadjii-msft zadjii-msft added this to the Terminal v1.18 milestone Mar 27, 2023
@zadjii-msft zadjii-msft changed the title Focus starts on titlebar with ssh profile in wt preview Focus starts on titlebar when opening a profile from a nested dropdown entry Mar 27, 2023
@kkostrzewa
Copy link
Contributor

kkostrzewa commented Mar 27, 2023

If this is in help wanted, I can take a look, as I'm off my regular 9-5 job this week. Bear with me as I haven't built wt yet. (This is from op's personal github account)

kkostrzewa added a commit to kkostrzewa/microsoft-terminal that referenced this issue Mar 31, 2023
extra Closing event to prevent focus from switching
to the tab bar when selecting a profile via mouse.
microsoft#15049
@kkostrzewa
Copy link
Contributor

@zadjii-msft I think I fixed this with main...kkostrzewa:microsoft-terminal:bug/15049-folder-focus-problem. Will PR.

@microsoft-github-policy-service microsoft-github-policy-service bot added the In-PR This issue has a related PR label Mar 31, 2023
DHowett pushed a commit that referenced this issue Apr 25, 2023
Original bug report #15049
Relates to feature #1571 

MenuFlyoutSubItem, when collapsing from profile selection, move focus
back to the titlebar.
An extra Closing event handler is needed to keep focus on the command
shell.

Closes #15049
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Apr 25, 2023
DHowett pushed a commit that referenced this issue Apr 25, 2023
Original bug report #15049
Relates to feature #1571

MenuFlyoutSubItem, when collapsing from profile selection, move focus
back to the titlebar.
An extra Closing event handler is needed to keep focus on the command
shell.

Closes #15049

(cherry picked from commit def3742)
Service-Card-Id: 89002014
Service-Version: 1.17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. In-PR This issue has a related PR Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-2 A description (P2) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants