Open dpolivy opened 9 years ago
@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.
@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!
@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 You want to add a minHeight
variable here:
Then use the code above to assign a value to it around here:
And finally, assign it to the element here:
Thank you @dpolivy, i'm going to work on it
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.