Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Disabled textareas don't get resized (FF + IE) #17

Closed
dshorowitz opened this issue May 12, 2016 · 7 comments
Closed

Disabled textareas don't get resized (FF + IE) #17

dshorowitz opened this issue May 12, 2016 · 7 comments
Labels

Comments

@dshorowitz
Copy link

If you disable your textarea, but it still receives new props (through a function call, for example), on Firefox and IE it won't get autoresized. Seems to be related to a known bug in FF: https://bugzilla.mozilla.org/show_bug.cgi?id=867418 in which dispatchEvent doesn't dispatch events on disabled form controls.

Any workaround?

@FrancescoCioria
Copy link
Contributor

react-autosize-textarea uses autosize library to resize the textarea.
I'm afraid I can't help you with you issue.
I suggest you to open an issue on autosize repo (https://github.com/jackmoore/autosize)

@gabro
Copy link
Member

gabro commented Jan 22, 2017

closing due to inactivity

@ilyazub
Copy link
Contributor

ilyazub commented Nov 30, 2018

@jackmoore suggested to

use autosize.update(textareaElement) to trigger the resize, rather than dispatching the custom event (autosize:update)
Autosize was updated not to use dispatchEvent when calling it's methods (autosize.update & autosize.destroy) to work-around Firefox dispatchEvent bugs.

jackmoore/autosize#301 (comment)

@FrancescoCioria @gabro What do you think? I may create PR with such changes.

@FrancescoCioria
Copy link
Contributor

@ilyazub thanks for this insight, I wasn't aware of it!

What do you think? I may create PR with such changes.

yes, that would be great :)

@ilyazub
Copy link
Contributor

ilyazub commented Nov 30, 2018

@FrancescoCioria I've opened PR: #115

@FrancescoCioria
Copy link
Contributor

fixed by #115

@ilyazub
Copy link
Contributor

ilyazub commented Dec 3, 2018

Thank you for such fast feedback.

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

No branches or pull requests

4 participants