use a recursive setTimeout instead of an interval for focus polling

r? @nchapman