• Resolved drmikegreen

    (@drmikegreen)


    When I’m using my mobile phone and click on a menu item for a new page, it scrolls back to the menu in the bottom of the page after opening the new page, instead of staying at the beginning of the new page. What can I do to correct this?

Viewing 13 replies - 1 through 13 (of 13 total)
  • Hi drmikegreen. Please post a link to your site so we can see the issue. Thanks.

    Thread Starter drmikegreen

    (@drmikegreen)

    Click on one of the items in the Daily Prayer Guide menu at https://isis.prayerpatrol.net/.

    Thread Starter drmikegreen

    (@drmikegreen)

    I just noticed that the main menu and the “>>” and “<<” do not work when on is not on the home page ??

    Hi drmikegreen. You may have a conflict with the WP-dTree plugin. On your mobile view the page scrolls to the first item in the left sidebar. The plugin widget in that sidebar has inline javascript running which may be causing, or be related to, the problem. It may also related to the second issue you mentioned above.

    Thread Starter drmikegreen

    (@drmikegreen)

    Hmmmm… I’ll have to dig into that.

    Thread Starter drmikegreen

    (@drmikegreen)

    The WP-dTree plugin does not appear to be the culprit. I removed it; and the behavior did not change. The screen still scrolled down just after loading. I even put a JavaScript window.scrollTo(0, 0) statement at the very bottom of the page. That had no effect either.

    My guess is that there is some jQuery which is causing this. I cannot, however, find it.

    This behavior does not occur for tablets, only for mobile phones. The other problem (the “>>” and “<<” do not work when one is not on the home page) is an issue for tablets. I believe this problem should be a separate thread. So I will now post it as such.

    So if it wasn’t WP-dTree it might be one of your other plugins. The next thing I’d try is to disable all the plugins and see if that fixes it. If it does, then re-enable them one at a time to see which one causes the issue.

    Thread Starter drmikegreen

    (@drmikegreen)

    I disabled all plugins. There was no change (except for the loss of functionality the plugins provided). So I have enabled all of the plugins again. I am now wondering if it has to do with the page layout I have chosen. So I am going to experiment with different layouts to see what happens…

    Thread Starter drmikegreen

    (@drmikegreen)

    It is the layout that causes the problem. If I remove the secondary sidebar the problem goes away. That sidebar is, however, needed. Does anyone have any idea of why having that sidebar causes this problem?

    Inspect the elements and expand the sidebar “rss_multi-importer” widget, then expand the “news-wrapper” div, then click on the “news-contents” div. The highlighted area is outside the widget container. Now move your mouse off that element and over one of the first 3 or 4 divs below it, but don’t click on it. You’ll see that div scrolling up the sidebar outside the container. They’re all doing that. I think that widget is your culprit.

    Thread Starter drmikegreen

    (@drmikegreen)

    Aha!

    The culprit is the Fetch a Prayer widget, which is embedded by an iframe.

    I’ll have to whether or not it is the iframe and whether or not there is another way to implement that widget.

    Well, I was close…;-) Glad you were able to track it down.

    Thread Starter drmikegreen

    (@drmikegreen)

    Fixed. I got rid of the iframe approach to loading that widget.

    Thanks for your help.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘New pages scroll to bottom upon opening in mobile phone’ is closed to new replies.