asafdav / ng-scrollbar

A custom scrollbar written in pure AngularJS
MIT License
187 stars 70 forks source link

Not working in IE, any version. #24

Closed cprichmond closed 10 years ago

cprichmond commented 10 years ago

There is a problem in IE (but it could happen in other browsers if border style is set to anything other than a numeric value) when calculating the extraHeight variable. The call to getStyle(element[0], 'border-bottom-width') returns 'medium'. When 'medium' is passed to parseInt() it returns NaN.

The simple fix is to protext against NaN by defaulting parseInt to 0 if it returns NaN (i.e. parseInt('medium') || 0).

The crux of the problem seems to be that IE defaults the border-bottom-width property to 'medium' where as Chrome and FF defaults to 0.

asafdav commented 10 years ago

Thanks! would you mind to pull request this ? I'll be happy to merge it

cprichmond commented 10 years ago

Yeah no worries, I'll try to get to it today. FYI, I think it's also a problem in Safari.

cprichmond commented 10 years ago

Scrap that and close this issue, I realized this is isolated to my fork. Sorry for the confusion.

asafdav commented 10 years ago

No worries, thanks for the update.