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

bug: ion-textarea autogrow with long text #24793

Closed
5 of 6 tasks
tetkosimi opened this issue Feb 15, 2022 · 7 comments · Fixed by #25684
Closed
5 of 6 tasks

bug: ion-textarea autogrow with long text #24793

tetkosimi opened this issue Feb 15, 2022 · 7 comments · Fixed by #25684
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@tetkosimi
Copy link
Contributor

tetkosimi commented Feb 15, 2022

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x

Current Behavior

When textarea contains long text, and auto-grow function is turned on, a big gap remains at the bottom of textarea. The gap is getting bigger as the text gets longer.

Expected Behavior

Calculate the size of the content properly, even for long texts.

Steps to Reproduce

  1. Clone the repo below and run npm i

  2. Start the project and open in desktop resolution. (It was tested on Google Chrome).

  3. Scroll to the bottom of page.

  4. You can write edit the content of textarea, the gap will remain.

Code Reproduction URL

https://github.com/tetkosimi/bug-ionic-textarea

Ionic Info

Ionic:

   Ionic CLI                     : 6.11.8 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 6.0.7
   @angular-devkit/build-angular : 12.1.4
   @angular-devkit/schematics    : 12.2.9
   @angular/cli                  : 12.1.4
   @ionic/angular-toolkit        : 4.0.0

Capacitor:

   Capacitor CLI   : 3.2.4
   @capacitor/core : 3.2.4

Utility:

   cordova-res (update available: 0.15.4) : 0.15.1
   native-run (update available: 1.5.0)   : 1.4.1

System:

   NodeJS : v16.13.0 (/home/bekkeri/.nvm/versions/node/v16.13.0/bin/node)
   npm    : 8.1.0
   OS     : Linux 5.10

Additional Information

I think, an overflow-y on the native textarea would be enough to solve this issue, as you can see on the right in the example.

@ionitron-bot ionitron-bot bot added the triage label Feb 15, 2022
@sean-perkins
Copy link
Contributor

@tetkosimi can you provide a screenshot/video of the issue you are experiencing? Comparing against your reproduction, I am seeing the same display on the "Wrong" and "Fix" version.

Thanks!

@sean-perkins sean-perkins added the needs: reply the issue needs a response from the user label Feb 16, 2022
@ionitron-bot ionitron-bot bot removed the triage label Feb 16, 2022
@tetkosimi
Copy link
Contributor Author

Hi @sean-perkins, here's a screenshot:
https://github.com/tetkosimi/bug-ionic-textarea/blob/main/screenshot.png

You're right, I just checked this issue on macOS with the latest Google Chrome and also couldn't reproduce, but I can still reproduce it on Window 10 with the latest Google Chrome.

@ionitron-bot ionitron-bot bot added triage and removed needs: reply the issue needs a response from the user labels Feb 16, 2022
@tetkosimi
Copy link
Contributor Author

I've also checked on Windows 10 with Firefox, and the big gap is there, however I can't reproduce it on Android.

It seems like this is just some kind of native scroll or scrollbar related issue on Windows.

@sean-perkins
Copy link
Contributor

@tetkosimi thanks for the screenshot! I'm noticing similar behavior on MacOS with Firefox (renders incorrectly and eventually repaints correctly).

Could you try this dev build against your local with Windows 10?

npm install @ionic/[email protected]

The build is off this PR that I started awhile ago to re-approach our auto-grow implementation. It appears to resolve the issue for Firefox on Mac, curious if it'll do the same against Windows.

Thanks!

@sean-perkins sean-perkins added the package: core @ionic/core package label Feb 16, 2022
@ionitron-bot ionitron-bot bot removed the triage label Feb 16, 2022
@sean-perkins sean-perkins added the type: bug a confirmed bug report label Feb 16, 2022
@tetkosimi
Copy link
Contributor Author

I've tried the dev build and it resolves the issue on Windows too.
Nice job, thanks!

@liamdebeasi
Copy link
Contributor

Thanks for the issue. This has been resolved via #24205 and a fix will be available in an upcoming release of Ionic.

@ionitron-bot
Copy link

ionitron-bot bot commented Aug 26, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Aug 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants