Hack to work around Mobile Safari's lack of page focus events