[BUG #7983] apply document size on window resize