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

MdTextareaAutosize: textarea control not sized correctly when number of lines is an odd number #4948

Closed
StevenRasmussen opened this issue Jun 3, 2017 · 8 comments · Fixed by #5773
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@StevenRasmussen
Copy link

Bug, feature request, or proposal:

Bug: When using the MdTextareaAutosize with a textarea and the number of lines that the text occupies is an odd number, the control size is slightly too small and scroll bars appear.

What is the expected behavior?

The control should be resized such that scroll bars never appear.

What is the current behavior?

Described above in the bug.

What are the steps to reproduce?

See plunker here

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular: 4.1.0
Material: 2.0.0-beta.6
TypeScript: 2.3.2

@julianobrasil
Copy link
Contributor

julianobrasil commented Jun 3, 2017

It seems ok (maybe it depends on the browser you tested it?):

image

@StevenRasmussen
Copy link
Author

Interesting... this is what I see:

image

I'm using Chrome Version 58.0.3029.110 (64-bit):

image

@julianobrasil
Copy link
Contributor

julianobrasil commented Jun 3, 2017

Tried resizing the browser window to see if it behaves different, but nothing. The vertical scroll bar isn't shown here.

By the way, I'm using the same chrome version, with different language:

image

I tested also in Edge, IE11 and in a very old Firefox portable copy I have here with the same result.

@StevenRasmussen
Copy link
Author

I used icognito mode in Chrome and turned off all extensions with the same result. Also just tried IE 11 and it looks like it might be working? It looks like there's scroll buttons but they're disabled and I think this might just be the default behavior of IE. However, it doesn't show the little icon in the bottom right corner that allows you to drag and resize the textarea:

image

Edge doesn't show the scroll bars but it also doesn't show the resize icon. It also appears to resize with extra space at the bottom when there is more than 2 rows of text:

image

Here's my OS info as well:

image

@julianobrasil
Copy link
Contributor

Except for the chrome vertical scroll bar, the other browsers here show the same behavior seen in your images.

I also use Window 10 with 1920 x 1080 resolution screen.

@jelbourn jelbourn added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label Jun 6, 2017
@StevenRasmussen
Copy link
Author

FYI - a good workaround or possible solution is just to set the style to: 'overflow:hidden' of the textarea. Any chance we can get this merged into the source without me submitting a PR?

@StevenRasmussen
Copy link
Author

@jelbourn, @mmalerba , any thoughts on adding the 'overflow:hidden' style into the source without a PR? Thanks

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants