BZ-1018218: delayed window resize until document is fully loaded