Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

overflow-x: hidden IE problem #112

Open
k-one-o-two opened this issue Nov 15, 2016 · 3 comments
Open

overflow-x: hidden IE problem #112

k-one-o-two opened this issue Nov 15, 2016 · 3 comments

Comments

@k-one-o-two
Copy link

k-one-o-two commented Nov 15, 2016

I've changed CSS a bit, adding

.scroll-wrapper>.scroll-content.scroll-hide-x {
            overflow-x: hidden !important;
        }

without this mod horizontal scroll-bar blinks when my div appears (using angular's ng-show).

Now there is a problem: scroll never gets to the bottom, i.e. top + height never equals max-height. Please, see the image attached.
scroll
As seen - IE adds margin-bottom to the style.
I've fixed the problem adding

if (browser.msedge || browser.msie) {
            var marginBottom = parseInt(c.css('margin-bottom'));
            scrollTop = scrollTop - marginBottom;
          }

to c.on('scroll' + namespace, function (event) { function.
This is an issue but not a PR since I'm not sure my fix is correct.

Can it be fixed some better way?

@gromo
Copy link
Owner

gromo commented Nov 16, 2016

If you use overflow-x: hidden !important, update function getBrowserScrollSize in jquery.scrollbar.js:

    return {
        height: Math.ceil((browser.data.outer.offset().top - browser.data.inner.offset().top) || 0),
        width: Math.ceil((browser.data.outer.offset().left - browser.data.inner.offset().left) || 0)
    };

change to

    return {
        height: 0,
        width: Math.ceil((browser.data.outer.offset().left - browser.data.inner.offset().left) || 0)
    };

@k-one-o-two
Copy link
Author

Thanks, I'll give it a try

@k-one-o-two
Copy link
Author

Tried this: it works, but only if I add this style (overflow-x: hidden) to all elements on which I use the scrollbar and it's not a good idea.
So, I think that my solution is better - I'll modify it a bit and make a PR then.

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

No branches or pull requests

2 participants