-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
InputTextArea auto-resize moves scroll position #8826
Comments
I am facing the same issue with v8.1.1 |
Remove the auto style for height as it was causing the scrollbar to jump for long text
@ViewChild(InputTextarea, {static: true}) this.textarea.resize = (event) => { |
With some more fiddling I realised that the height = 'auto' is not the culprit.
I have tested this in multiple browsers (even IE) and it works!! |
I was referring to this commit d90db59 where removing one assignment of this.el.nativeElement.style.height somehow solves the problem and also with the explanation from here angular/material#3070 I assumed that the 'auto' setting has something to do with it. Your solution makes sense, but still I cannot explain why having two assignments on same property one after the other causes scroll jumping. |
I am experiencing this issue in my corporate application, is there a timeline for this bug to be fixed? |
Hi,
My inputTextarea has the autoResize attribute with the value true. I have created a stackblitz (forked from the original dynamic dialog stackblitz). https://stackblitz.com/edit/primeng-dynamicdialog-demo-bjvlru?file=src%2Fapp%2Fproductlistdemo.ts To reproduce the behaviour:
Observed behaviour: |
Hi, If the issue still exists with the latest PrimeNG version, please provide a StackBlitz example by using PrimeNG Issue Template and re-open the issue. Regards |
Issue still exists. |
I'm submitting a ...
[x] bug report => Bug fixed with #7481 is re-introduced.
Current behavior
Auto resize moves scroll position. Issue still persists due to this line
https://github.com/primefaces/primeng/blob/master/src/app/components/inputtextarea/inputtextarea.ts#L64
Expected behavior
Setting auto resize shouldn't affect the scrolling. Issue is solved if the offending line is removed.
Current workaround is by overriding the resize method of textarea, but proper solution is needed.
This is broken in latest v8 (8.1.1) and also on master.
The text was updated successfully, but these errors were encountered: