Auto-select the message target when switching tabs
It would be good to manage the message target per tab and not globally.
This way, when you switch to another tab, one of the visible target will be automatically selected. This would avoid writing to a wrong target...
Another way to deal with it would be to keep the current behavior, but when you start typing something, the tab containing the target will be automatically selected.