Vinsu
Vinsu

Reputation: 37

Unable to scroll IE7 scrollbar

I have a page with lots of scrollable containers in it. All these containers contain some list or so. Everything works perfect in all the browsers except IE7 (Having tested in IE6 and below). In IE7 when I try to scroll by clicking on the scrollbar, its not happening. But if I double click on the scrollbar, then I will get the focus on the scrollbar and I will be able to scroll. The mousewheel scroll works perfectly though.

There are a lot of jquery plugins in my page such as datatable, jquery UI, autosuggest etc.

When I disable script in my browser, the scroll works fine.

Any idea on what is happening? (as an ie7 issue)

Upvotes: 0

Views: 708

Answers (5)

Milson
Milson

Reputation: 1575

If we can use a plugin :

http://jscrollpane.kelvinluck.com/

we can easily fix this issue of cross browser scroll pane.

Upvotes: 0

Brooksie
Brooksie

Reputation: 31

Some version of IE are temperamental to non-strict syntax, e.g. if you have a missing ; somewhere. An option is to run your code through jslint but this may prove tricky if your code is not well organised.

If you have IE9 you should be able to check for errors by hitting F12, roll back the version to IE7 and monitor the console output.

Trial and error is probably the answer, if all your code is just 1 big block then I'd suggest re-factoring into manageable chunks (classes methods) first.

Good luck.

Upvotes: 0

JF it
JF it

Reputation: 2403

It seems like theres an extra click event or something blocking the scrollbar, try using $(...).unbind('click') on those elements.

Upvotes: 0

user1791739
user1791739

Reputation: 21

An uncaught javascript error may be the cause of your problem. Try using try...catch, e.g.

try {
  //any questionable JS code
} catch(err){
  alert(err.message);
}

If there is any error, that should let you know.

Upvotes: 2

JumpingJezza
JumpingJezza

Reputation: 5665

Without seeing your code I'm only able to guess that your page is throwing a javascript error in ie7. There are a few javascript functions that don't work in ie7 (such as getElementsByClassName which has caught me out before). I'd suggest debugging the javascript in ie developer tools or another debugging tool to find the problem.

Upvotes: 0

Related Questions