More refinements to focus handling.