fix weird focus issue. I think this fixes #1293, #1468.

Signed-off-by: Chris Granger <ibdknox@gmail.com>