Fix issue with page scrolling up when a javascript method is called.