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

Vertical overflow calculation impacting horizontal overflow, vice versa #98

Closed
devendran opened this issue Mar 12, 2019 · 3 comments
Closed
Labels

Comments

@devendran
Copy link

We noticed an issue when the vertical overflow calculation impacting horizontal overflow.

The issue is narrowed down to force rounding code below, where in overflowAmount.x check makes overflowAmount.y as zero even in valid cases

var hideOverflowForceRounding = (_viewportElement[0].scrollLeftMax === 0 && overflowAmount.x > 0 && overflowAmount.x < 1) || (_viewportElement[0].scrollTopMax === 0 && overflowAmount.y > 0 && overflowAmount.y < 1);
if (hideOverflowForceTextarea || hideOverflowForceRounding)
	overflowAmount.x = overflowAmount.y = 0;

We have fixed by making 2 different variables each for x and y calculations like below

var hideOverflowForceRoundingX = (_viewportElement[0].scrollLeftMax === 0 && overflowAmount.x > 0 && overflowAmount.x < 1);
var hideOverflowForceRoundingY = (_viewportElement[0].scrollTopMax === 0 && overflowAmount.y > 0 && overflowAmount.y < 1);
                        
if (hideOverflowForceTextarea || hideOverflowForceRoundingX)
	overflowAmount.x =  0;
if (hideOverflowForceTextarea || hideOverflowForceRoundingY)
    overflowAmount.y =  0;
@KingSora
Copy link
Owner

Good day!

Thanks for your contribution! I'll implement it as soon as I've time, but at the earliest in 2 weeks, because I'm on vacation right now.

@KingSora
Copy link
Owner

Small update here, because its been a while.
I've fixed this issue and it will definitely be included in the next version!

@KingSora
Copy link
Owner

Version 1.7.0 is now out!

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

No branches or pull requests

2 participants