withfig / fig

Public issue tracker for Fig.
https://fig.io
MIT License
2.05k stars 63 forks source link

Any new terminal window loses focus after typing a few characters #645

Closed julioromano closed 2 years ago

julioromano commented 2 years ago

Description:

Steps to reproduce: 1) Open a new terminal window (I tested it with Terminal.app, iTerm.app and Visual Studio Code.app). 2) Type any 2 random characters. 3) Wait a few seconds (no more than 10). 4) Watch the terminal window loose focus (the Terminal app itself doesn't lose focus but the terminal window does).

To type more characters you are forced to click on the terminal window to let it regain focus.

Tested with MacOS 12.0.1 running on M1 processor. fig doctor doesn't detect any issue.

Details:

macOS Fig Shell
12.0.1 Version 1.0.52 (B324) /bin/zsh
fig diagnostic

Version 1.0.52 (B324) [ABC] 
UserShell: /bin/zsh
Bundle path: /Applications/Fig.app
Autocomplete: true
Settings.json: true
CLI installed: true
CLI tool path: /Users/julionb/.fig/bin/fig
Accessibility: true
Number of specs: 1
SSH Integration: false
Tmux Integration: false
Keybindings path: 
iTerm Integration: true 
Hyper Integration: false
VSCode Integration: true
Docker Integration: false
Symlinked dotfiles: false
Only insert on tab: false
Installation Script: true
PseudoTerminal Path: /opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/julionb/.fig/bin
SecureKeyboardInput: false
SecureKeyboardProcess: 
Current active process: ??? (???) - ???
Current working directory: ???
Current window identifier: ???

mschrage commented 2 years ago

Thanks so much for reporting this @julioromano! Would you mind taking a screen recording of this behavior?

julioromano commented 2 years ago

Here you go: https://user-images.githubusercontent.com/1273124/144380792-5373c82d-dc57-4a63-9db9-8ce2fd45a308.mov Hope it helps.

harripj commented 2 years ago

I also experienced this behaviour in #630.

mschrage commented 2 years ago

I think we've found the culprit. It looks like when fig launch is run, it will pull focus away from the terminal.

That happens in two cases:

  1. when a terminal is launched and Fig isn't running
  2. when a terminal is launched and Fig is updated
julioromano commented 2 years ago

Updated to Version 1.0.52 (B328) right now and it seems the bug has vanished!

mschrage commented 2 years ago

Thanks for the confirmation @julioromano! We pushed a fix and it looks like it's working.