PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Making selection scrolls to top

  1. Nick Hempsey
    Member

    I have a form here: http://mercedesbenzsanjuan.com/home/

    When you make a selection on the radio buttons, it's auto-scrolling to the top of the page. this only happens in Firefox and Opera.

    Any one have any ideas how to fix this?

    Posted 11 years ago on Wednesday January 30, 2013 | Permalink
  2. If you see different browsers react differently, the first step would be to validate the XHTML on the page to see if you can get all browsers to react the same.

    http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fmercedesbenzsanjuan.com%2Fhome%2F

    If I had to guess, I would say the HTML you added to the form to get the car images in there is what is causing the problem.

    If that' does not help, I would check for theme and plugin conflicts by following these steps http://rkt.gs/testing . Maybe there is some JavaScript being added to scroll the page when an image is clicked or something.

    Posted 11 years ago on Thursday January 31, 2013 | Permalink
  3. Nick Hempsey
    Member

    Thanks Chris,
    I've gotten my errors down to 2 in the validator (1 is coming from Gravity Jquery).

    I started troubleshooting and I've narrowed it down to something in my theme as it works fine with all plugins activated in Twenty Eleven. I'll start removing JS and Jquery to figure out what I added to screw it up.

    Thanks. I'll post back when I figure it out.

    Posted 11 years ago on Thursday January 31, 2013 | Permalink
  4. Nick Hempsey
    Member

    So it's not a js apparently, it's the CSS, but I can't seem to figure out what would be doing it.

    Are there any areas of the form that when clicked that are supposed to send the page to the top that might be "floating" over that area or something? I can't see why this would be happening. But it's definitely the CSS.

    I made a page with just the form on it ( http://mercedesbenzsanjuan.com/just-the-entry-form/ ) in the theme I built, and it worked fine. Then I added in the stylesheet for the homepage and it started scrolling to the top when clicking on those elements.

    I'm pretty good with CSS, but I'm missing something... any ideas?

    Posted 11 years ago on Thursday January 31, 2013 | Permalink
  5. Nick Hempsey
    Member

    and... I figured it out!

    It's because I was positioning the actual input button off the screen instead of just visually hiding it. I think that maybe as you clicked it it was trying to apply a focus to it and it was scrolling up the page because I had them all positioned beyond the very top left of the page.

    Blerg... what a mess for something so simple.

    This can be marked as resolved.

    Posted 11 years ago on Thursday January 31, 2013 | Permalink
  6. David Peralty

    Glad you were able to figure it out. All my best!

    Posted 11 years ago on Thursday January 31, 2013 | Permalink

This topic has been resolved and has been closed to new replies.