Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unnecessary scrollbar appears in IE #64

Open
Hellga opened this issue May 17, 2016 · 4 comments
Open

unnecessary scrollbar appears in IE #64

Hellga opened this issue May 17, 2016 · 4 comments

Comments

@Hellga
Copy link

Hellga commented May 17, 2016

The issue is related to IE scrollHeight issue described here:

http://stackoverflow.com/questions/22174841/scrollheight-is-incorrect-in-ie.

When the element has property - { overflow: auto or hidden; } - .scrollHeight of the element can be 1 or 2 px bigger than .innerHeight(). That causes unnecessary scrollbar appearance in IE. Cause the calculations here:

pct = paneHeight / this.scrollHeight

will result in a number bigger than 1.

@vedankita
Copy link

I am facing same problem with IE browser is there any solution to remove unnecessary scrollbar

@Hellga
Copy link
Author

Hellga commented Jun 17, 2016

I haven't found any solution to get the correct value of scrollHeight. Therefore the only workaround for me was to decrease 'this.scrollHeight' value in the code, so that the code will be the following:

pct = paneHeight / (this.scrollHeight - 2) (in resize method)

Not a very good solution, but it works. Just one note: in some cases scrollHeight in IE is 2 px bigger than in Chrome, so I've decreased the value by 2.

@vedankita
Copy link

thanks 👍

@jstoudt
Copy link
Owner

jstoudt commented Jul 4, 2016

@Hellga I've been looking into this for some time now, and I haven't found an acceptable solution to this problem.

Unfortunately, the only advice I can offer is to avoid styling components inside the enscroll pane which trigger IE's rounding error. For example, using points to specify font-size converts to a subpixel pixel size which can trigger the error.

I know this isn't always an acceptable solution, so I will keep thinging of something better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants