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: wrong autoHeight counting #1843

Closed
slunecniborecek opened this issue Jul 8, 2017 · 3 comments
Closed

TextArea: wrong autoHeight counting #1843

slunecniborecek opened this issue Jul 8, 2017 · 3 comments

Comments

@slunecniborecek
Copy link
Contributor

slunecniborecek commented Jul 8, 2017

Steps

  1. create TextArea instance with autoHeight property
    <TextArea autoHeight />
  2. put a content in there (just keep typing or copy & paste some text); while doing this do not press <enter> key

Expected Result

TextArea grows with the content

Actual Result

TextArea keeps the original size; It only grows when pressing <enter> key. Actually it only counts newLines * lineHeight (simplified) which is IMO wrong

Version

0.71.0

Testcase

https://react.semantic-ui.com/addons/text-area#text-area-example-auto-height

Contribution

I have a fix ready locally if interested

@levithomason
Copy link
Member

Confirmed issue. PRs are very much welcome.

@slunecniborecek
Copy link
Contributor Author

@levithomason PR is ready for review

@slunecniborecek
Copy link
Contributor Author

@levithomason thanks for merging. Unfortunately with your last commit you broke the functionality on IE browsers.

steps 1:

  1. copy a long text
  2. paste using context menu

steps 2:

  1. make text area to grow some height
  2. select all text in it
  3. using context menu, click 'delete' or 'cut'

Expected:
textarea is resized properly in both steps1 and steps2

Actual:
the height stays

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

No branches or pull requests

2 participants