-
Notifications
You must be signed in to change notification settings - Fork 3.4k
scroll/focus issue with texarea inside md-input-container #6800
Comments
Yes, that's weird, I think it's mostly related to the actual |
@devversion @ThomasBurleson There have been a few other issues that were similar to this in the past. Some of those issues were related to height being changed to auto which was causing the textarea to jump. Not sure if that is still the cause here, haven't had a chance to poke around. I don't seem to have these problems with polymer's iron autogrow textarea which uses a 'mirror' div to show the textarea onscreen. There are probably good reasons for not mimicking that implementation (it would be a major change 👎 )... just a suggestion 👍 |
@mckenzielong I think a more user-friendly solution would be adding an attribute called |
@devversion The iron implantation in general just seems cleaner to me, again just an opinion. The api is simple and the implementation doesn't try to be too clever. Honestly 1.0 textarea behaviour is backwards to me considering it defaults to auto-growing. We have md-no-autogrow, we have rows. Apart from avoiding breaking existing behaviour that should be all we need(maybe max-rows similar to iron's implementation?)
As mentioned these are just opinions, I wouldn't expect such a change really. I long dropped the current implementation for polymer's iron version for in an internal project (during the .1x releases? something like that) and since similar issues keep popping up, figured I would make that suggestion 👍 |
@mckenzielong I think Iron Textarea
Suggested
I think in this case, the suggested attribute usage is more user-friendly than the |
Eh, it is really just squabbling over semantics. I am thinking more in terms of what the attribute In "Suggested" min-rows would set the 'default rows', and I assume it grow until rows (haven't had time to pull that source to see how this use case would behave) That would also open up the use of md-no-autogrow to set a true fixed size textarea. |
I don't know, who defined the |
👍 @ThomasBurleson maybe we can clarification on md-no-autogrow too... - I have an inclining it isn't behaving properly (regardless of the discussion above) |
It does seem like the text-area needs some fine tuning. I did manage to get a workaround working by putting the shown here if anyone else finds themselves in the need of a quickfix |
When the input-container has a max-height but the content of the textarea exceeds that, and also has
overflow:auto
when navigating or entering new text it automatically scroll to the top.codepen(based in master since the codepens for 1.0.2 was broken), you need to enter the text area for it to show.
There are some similar issues regarding textarea, but they seem subtly different: example #6296, #3070
nearest one i think is #2007
The text was updated successfully, but these errors were encountered: