Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Allow specifying minimum height on autogrow textarea #8161

Open
dpolivy opened this issue Jun 24, 2015 · 5 comments
Open

Allow specifying minimum height on autogrow textarea #8161

dpolivy opened this issue Jun 24, 2015 · 5 comments

Comments

@dpolivy
Copy link

dpolivy commented Jun 24, 2015

I have a scenario where I'd like to set the minimum height of a textarea dynamically, and still incorporate the autogrow/shrink behavior that is currently available. This is desirable in order to make UI elements line up correctly in a default layout.

Currently, setting min-height on the textarea element directly, it will be removed by the autogrow code.

@arschmitz
Copy link
Contributor

@dpolivy I think this is a good idea. We are going to be moving the textinput widget to jQuery ui we will keep this in mind for sure.

@dpolivy
Copy link
Author

dpolivy commented Jun 24, 2015

@arschmitz Great! FWIW, here's my current 'hack' to enable this:

In _updateHeight for the mobile.textinput widget, I fetch the desired min-height from a data attribute:

        minHeight = parseFloat( this.element.data( "minHeight" ) ) || "";

Then, I just use "min-height": minHeight in the call to update the CSS. Seems to work just fine!

@ImoyaCas
Copy link

ImoyaCas commented Oct 5, 2017

@dpolivy could you explain a bit more detail to me what I should do to insert a min-height to a textarea with autogrow? thank you!

@ImoyaCas
Copy link

ImoyaCas commented Oct 9, 2017

Thank you @dpolivy, i'm going to work on it

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

No branches or pull requests

5 participants