Update selector position calculation and handling of focus