Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set minimal height of all textareas to 100px #16566

Merged
merged 3 commits into from Oct 14, 2020
Merged

Set minimal height of all textareas to 100px #16566

merged 3 commits into from Oct 14, 2020

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Oct 13, 2020

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

@sgiehl sgiehl added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels Oct 13, 2020
@sgiehl sgiehl added this to the 4.0.0-RC milestone Oct 13, 2020
@tsteur
Copy link
Member

tsteur commented Oct 13, 2020

@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
Copy link
Member Author

sgiehl commented Oct 14, 2020

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

@tsteur
Copy link
Member

tsteur commented Oct 14, 2020

👍 works

@tsteur tsteur merged commit d58aee2 into 4.x-dev Oct 14, 2020
@tsteur tsteur deleted the textareaheight branch October 14, 2020 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Global list of Excluded IPs shows only one IP
2 participants