Docker terminal focus
Answered
This is absolutely driving me crazy and I can't seem to find a setting / workaround.
When I have two terminals in a docker container open, switching between them will focus the restart button instead of the prompt.
So when I start typing it will click restart resulting in all terminal windows restarting.
As well as killing whatever was running in them it also delete all previous commands.
Is there a way to change this behavior or can one be implemented?
Please sign in to leave a comment.
Hello, Lucius Victus. Could you please check the state of the Override IDE shortcuts option in
Settings | Tools | Terminal
window? Does it help if you switch it?Hi Olga, that option was checked for me so I disabled it which didn't change the behavior. I restarted the IDE just to be sure and that didn't help either unfortunately.
For now I've found a workaround by just using the docker command from the regular terminal window. I guess I got so used to doing it through the services tab that it never really occurred to me to do it this way.
I'm still not sure why you'd favor highlighting the restart button over putting the user at the prompt but for now I'm happy and not driving myself crazy anymore with accidental restarts.
Lucius Victus, thank you for the update; glad you found the workaround.
Meanwhile, I wasn't able to reproduce the problem on my side: the focus is indeed out of the terminal itself, but typing doesn't trigger container restart. Could you please provide a bit more detail on how exactly you switch between terminal tabs, with the shortcut, or manually? Are there any other important details?
Just to make sure we're on the same page this is what I'm talking about.
Here's what I do:
Right click the container and use the menu to open two terminal windows.
Upon opening they are not focused nor is the restart button.
Using the mouse I switch to the first terminal and that is what you see in the screenshot.
The restart button is now focused.
My initial comment about typing wasn't completely correct as it's the space bar specifically that triggers the activation of the button.
I just never noticed because I switched and started typing “php<space>” and would get the restart.
I can't remember changing any settings that would interact with this. I think the only terminal related one I changed was the keybind to open a regular terminal.
Thank you for the clarification; now I'm able to reproduce the problem. Created a new bug report in our issue tracker; please consider upvoting it to receive updates.