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

Revert "fix(modal): check for overflow hidden" #41

Merged
merged 1 commit into from
Nov 16, 2018

Conversation

phazei
Copy link

@phazei phazei commented Nov 16, 2018

This reverts commit 433e536.

This "fix" causes the general use case of being attached to the body to fail. This can be seen on the example site, past v2 the padding isn't added when it should be and the page 'jumps' when the scrollbar disappears.

This PR doesn't fix the original issue:
angular-ui#6037

But it does repair the general case which is more important than the edge case that's addressed.

This reverts commit 433e536.

This "fix" causes the general use case of being attached to the body to fail. This can be seen on the example site, past v2 the padding isn't added when it should be and the page 'jumps' when the scrollbar disappears.
@Morgul
Copy link
Owner

Morgul commented Nov 16, 2018

Hmm, interesting. This is a tough once, because both scenarios are "bad", but I do think that the fix in this case is a little worse than the bug.

I'm going to merge this, but only after opening a tracking bug for the original item, because I don't want to forget that this is here, or why I merged this in the first place.

@phazei
Copy link
Author

phazei commented Nov 16, 2018

The calculation for scrollbarPadding.heightOverflow does a lot of the same calculations as the isScrollable method. In addition to checking the overflow css values, it checks the clientHeight & scrollHeight and searches up the parent tree to find a scrollable parent. Perhaps that could be updated to handle the cases. Or isScrollable could be updated to handle a special case for body & html. Unfortunately I don't have the time to address that as well.

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

Successfully merging this pull request may close these issues.

2 participants