Skip to content

Terminal flashes when running a command that opens up scripts in new tabs #14605

Open
@SimonCockx

Description

@SimonCockx

Windows Terminal version

1.15.3466.0

Windows build number

10.0.22621.0

Steps to reproduce

  1. Set "New instance behaviour" setting to "Attach to most recently window on this desktop".
  2. Open two tabs (say Tab 1 and Tab 2).
  3. In Tab 1, run any command that runs a script in a new terminal. Minimal example: run start powershell {echo hello}.
  4. Observe that you are now in Tab 2.

Expected Behavior

I would expect the tab initiating a command to keep focus. (i.e., I would expect that Tab 1 would remain focussed)

Actual Behavior

Minimal example:

echo.example.mp4

Observe that I initiate the command in Tab 1, but I end up in Tab 2.


To get a real feeling of when this behaviour is incredibly annoying, run a command that launches many terminals. Then you get the "flashing" behaviour mentioned in the title of this issue.

I'm using nx as a build tool, which constantly opens up new terminals to run subscripts. Observe:

nx.example.mp4

The observed behaviour is that this command opens a new tab which immediately gets the focus, then closes within a matter of milliseconds, as a consequence focussing on the last tab of the terminal instead of the initial one. This is repeated several times.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-DefAppIssue-BugIt either shouldn't be doing this or needs an investigation.Product-TerminalThe new Windows Terminal.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions