Andarist / react-textarea-autosize

<textarea /> component for React which grows with content

Home Page:http://andarist.github.io/react-textarea-autosize/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

maxHeight doesn't work on Firefox

Captp2 opened this issue · comments

Code example :

<TextareaAutosize
                        id="input-textarea"
                        minRows={1}
                        maxRows={2}
                        value={input}
                        onChange={handleInputChange}
                        onKeyDown={handleInputKeyPress}
                        placeholder={inputPlaceholder()}
                        onClick={hideWrapperFlexClass}
                        onBlur={showWrapperFlexClass}
                        className="border-none resize-none rounded-l-xl w-full py-4 pl-4 text-sm focus:outline-none"
                    ></TextareaAutosize>

Screenshots :

On firefox (100.0, latest version to date) :

image

On chrome :

image

I'm guessing it's related to Firefox's handle of height mentioned here : #313

I'll try and investigate the issue and produce a fix/workaround.

Edit : I'm using Tailwind and adding a max-height did the trick.