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 scrollbars apprea sometimes #349

Open
ohute-couture opened this issue Dec 29, 2017 · 0 comments
Open

Vertical scrollbars apprea sometimes #349

ohute-couture opened this issue Dec 29, 2017 · 0 comments

Comments

@ohute-couture
Copy link

It was fixed to 29ca460 due to the box-sizing =border-box scrolling issue of IE #327.

When box-sizing = border-box, the problem reported in #306 was reoccurring in Chrome. It's the same reason.

var ta = document.querySelector('textarea');
ta.style.height = '1336px';
window.getComputedStyle(ta).height; // 1335.99px
window.offsetHeight //1335 
Math.round(parseFloat(ta.style.height)) //1336 

image

If box-sizing = border-box in IE is a problem, You just need to check if it is not IE but box-sizing in your code.
or I think we need to set a margin value to avoid unnecessary scrolling.

And,
I think we should only make it happen when the actual height is high. autosize.js#L143
actualHeight !== styleHeightactualHeight > styleHeight

Please confirm.

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

1 participant