Commit eb594b730672e1f5af656578eaa9db6420a8f16a
1 parent
a4fefc0c
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Fix expandable text area
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
app/helpers/application_helper.rb
... | ... | @@ -1160,7 +1160,8 @@ module ApplicationHelper |
1160 | 1160 | end |
1161 | 1161 | |
1162 | 1162 | def expandable_text_area(object_name, method, text_area_id, options = {}) |
1163 | - text_area(object_name, method, { :id => text_area_id, :onkeyup => "grow_text_area('#{text_area_id}')" }.merge(options)) | |
1163 | + options[:class] = (options[:class] || '') + ' autogrow' | |
1164 | + text_area(object_name, method, { :id => text_area_id }.merge(options)) | |
1164 | 1165 | end |
1165 | 1166 | |
1166 | 1167 | def pluralize_without_count(count, singular, plural = nil) | ... | ... |