avoid focusing active tab if tab is detched

Signed-off-by: nuss <st9fan@gmail.com>