another version for preventing page scrolling