Only grab the focus when appropriate