Fix issue of resize triggered on scroll for mobile.