Friday, March 4, 2011

html - scrollbar jump by itself

Hi all,

I'm experiencing this weird problem which my scrollbar jumps by itself to somewhere that I don't want it to.

I have a table with scrollbar inside this page, if the user have a smaller screen, the page automatically adds a scrollbar. If I scroll down to the bottom of the table and click on it, the scrollbar of the page jumps up so I can no longer see the thing I clicked. Any ideas?

Thanks.

From stackoverflow
  • There are a number of things that can be causing this.

    • You clicked on a hyperlink with a href of "#", which will cause most browsers to scroll to the top of the page,
    • There's possibly a CSS :focus or :active rule somewhere being triggered that causes the height of the page to change
    • There's a javascript onclick event firing and changing the page
    • ...or possibly something else entirely.

    Have you tried in different browsers? It could be a bug in the browser itself.

  • My scrollbar jumps when I hit Page Up or Page Down. Also, my laptop trackpad can cause odd mouse behavior if I bounce my thumb against it.

    And when I poured a large Latte into my keyboard, I had problems, then. But then the whole computer stopped working about an hour later.

  • Are you sure the object causing the problem is not an <a href='#'><div onclick='yourJavaScriptFunction()'>...</div></a> or something similar?

  • Perhaps you have a meta refresh tag

    <meta http-equiv="refresh" content="600">
    

    I have seen these cause similar issues on safari, post a link to the page and you will find getting a solution much easier.

0 comments:

Post a Comment