More optimizations for resize handling. Again, this should help on mobile devices where resize handling for showing keyboard or changing orientation has been problematic.