www.webdeveloper.com
Results 1 to 9 of 9

Thread: IE accordion bug

  1. #1
    Join Date
    Dec 2009
    Posts
    7

    IE accordion bug

    Hello, this is probably an easy question for many of you. I searched for a couple hours but couldn't find an answer anywhere...

    I have a very long unmodified Dreamweaver accordion on a page, and when you click at the bottom of the accordion the IE jumps to the top of the page hiding the content. It might need a JS fix, I think.

    Here is an example(try to open accordion #20-#30 in IE): Clicky

    Here is the JavaScript for the accordion: http://rus-import.com/SpryAssets/SpryAccordion.js

  2. #2
    Join Date
    Jan 2005
    Location
    Los Angeles, CA
    Posts
    4,887
    A possible yet unorthodox solution:
    Code:
    <script type="text/javascript">
    function showMe(t){
    setTimeout(function(){t.parentNode.scrollIntoView(false)},1);
    }
    </script>
    Code:
        <div class="AccordionPanel">
          <div class="AccordionPanelTab" onclick="showMe(this)"><img src="picture.jpg" alt=""/> Label 38</div>
          <div class="AccordionPanelContent"><center>Content :</center><br /><br /><center>Internet Explorer Suks : (</center></div>
        </div>

  3. #3
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Remove tabindex="0"
    At least 98% of internet users' DNA is identical to that of chimpanzees

  4. #4
    Join Date
    Dec 2009
    Posts
    7
    Thanks for the replies. I modified page like you told me. This is wierd, only section #38 works OK in IE, when I try opening any other section the page still jumps to the top...

    http://rus-import.com/missing.html

    Edit: Try clicking a few times on different sections below #15 without using the scroll wheel after you click. you will see that IE will start hiding the "content"...
    Last edited by smoothDude; 01-27-2010 at 06:45 AM.

  5. #5
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Don't use function showMe
    At least 98% of internet users' DNA is identical to that of chimpanzees

  6. #6
    Join Date
    Dec 2009
    Posts
    7
    I really appreciate you suggestion but i don't think that it solves the problem. IE still jumps to the top of the page when you open a bottom section.

    http://rus-import.com/missing.html

  7. #7
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Quote Originally Posted by Fang View Post
    Remove tabindex="0"
    This is the problem
    Attached Files Attached Files
    At least 98% of internet users' DNA is identical to that of chimpanzees

  8. #8
    Join Date
    Dec 2009
    Posts
    7
    I tried you file still problem, my IE6 and 7 jump to the top of the page hiding the opened section. So when you remove tabindex="0" and click on the bottom section of the accordion the page remains still on your IE?

  9. #9
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    It works for IE8, for other versions, Ultimater's solution will be necessary.
    At least 98% of internet users' DNA is identical to that of chimpanzees

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles