Anybody else use a multiline input set to “stretch to fit content”, and see it default to an input height to 2 lines? Is there a way around this so the default input height is 1 line, until the user types >1 line?
Here is the editor view (height of 23 px):
Here is the live preview (“min-height” is still 23px, as seen in web inspector; but “height” is already at 36px):
Here is the live preview if you unselect “stretch to fit content” - the unnecessary height disappears.
Solved it. The default number of rows is “2” (2em) for a “textarea” html tag, which is what a bubble multiline input is made of. To change the number of rows to “1” (1em), add the css below into your bubble header (< and > symbols enclosing the words “style” and “/style”, of course).
But, if you want 1 row by default and your multiline input to stretch to fit content, the way to go seems to be with a bit of javascript, as below. You’ll need to adjust the bolded text to fit your project.
@Lucien I would love to know if you or anyone else can work this out? Stretching the input container upwards will probably be my challenge to tackle, soon Will keep updated if I find a solution.
Just gave it some more thoughts, I guess it’s achievable with this (paid) plugin by setting conditions based on the multiline input’s value’s number of characters, which would both move up and resize the multiline input element.