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

TextArea height calculation error when autosize is configured #9107

Closed
cuyl opened this issue Jan 24, 2018 · 1 comment
Closed

TextArea height calculation error when autosize is configured #9107

cuyl opened this issue Jan 24, 2018 · 1 comment
Assignees

Comments

@cuyl
Copy link
Contributor

cuyl commented Jan 24, 2018

Version

3.1.4

Environment

edge & IE

Reproduction link

https://codesandbox.io/s/qqq1ynq16j

Steps to reproduce

set paddingRight to 0
set autosize any minRows and maxRows

  <div>
    <!-- autosize work -->
    <TextArea style={{ paddingRight: 0 }} placeholder="Autosize height based on content lines" autosize />
    <div style={{ margin: '24px 0' }} />
    <!-- autosize error -->
    <TextArea style={{ paddingRight: 0 }} placeholder="Autosize height with minimum and maximum number of lines" autosize={{ minRows: 2, maxRows: 6 }} />
  </div>

see https://codesandbox.io/s/qqq1ynq16j edge or IE

What is expected?

autosize

What is actually happening?

textarea height calculation error

@cuyl
Copy link
Contributor Author

cuyl commented Jan 24, 2018

hiddenTextarea.value = '';
let singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;

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

4 participants