2

Out of the box the default iphone theme that comes with Magento jumps back to the top of the category page after a user clicks on a product and after viewing the product hits the back button. It is frustrating for the user to have to scroll back down to the point they were previously on the category page.

I have tried different javascript functions to correct this but no matter what I do the page keeps jumping to the top on reload. I am on a linux based server so asp.net is not an option. I don't have this problem on Safari, or Windows browsers but Chrome and Silk do have this problem.

Thanks for any help.

1 Answer 1

0

I found the culprit. There was a bit of Javascript in the head.phtml file in the iphone theme. Get rid of:

    <script>
//<![CDATA[
    addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false);
    function hideURLbar() {
        window.scrollTo(0, 1);
    }
//]]>
</script>

and it will no longer jump to the top.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.