@sgiehl opened this Pull Request on October 13th 2020 Member

To ensure all textareas fit the height of their content, we could use this javascript

$('textarea').each(function(){M.textareaAutoResize($(this))});

But actually I'm not sure where to add it properly....

fixes #16560

@tsteur commented on October 13th 2020 Member

@sgiehl if I understand things correctly that would go into plugins/CorePluginsAdmin/angularjs/form-field/form-field.directive.js? There could be something like

if (hasUiControl(field, 'textarea')) {
    M.textareaAutoResize... 
}

not sure it works but this be generally speaking the correct place I reckon. If you need the DOM element I think there's also a method whenRendered so you can take action once it's fully rendered by angular

@sgiehl commented on October 14th 2020 Member

@tsteur good hint. there was actually a autoresize in that file already, that didn't work anymore. It should work again now...

@tsteur commented on October 14th 2020 Member

👍 works

This Pull Request was closed on October 14th 2020
Powered by GitHub Issue Mirror