diff -u b/core/includes/form.inc b/core/includes/form.inc --- b/core/includes/form.inc +++ b/core/includes/form.inc @@ -2587,24 +2587,21 @@ * */ function template_preprocess_textarea(&$variables) { - $element = $variables['element']; - element_set_attributes($element, array('id', 'name', 'rows', 'cols', 'placeholder')); - $variables['attributes'] = $element['#attributes']; + $element = $variables['element']; + element_set_attributes($element, array('id', 'name', 'rows', 'cols', 'placeholder')); + _form_set_attributes($element,array('form-textarea')); + $variables['wrapper_attributes'] = new Attribute(array( + 'class' => array('form-textarea-wrapper'), + )); - $variables['wrapper_attributes'] = new Attribute(array( - 'class' => array('form-textarea-wrapper'), - )); + // Add resizable behavior. + if (!empty($element['#resizable'])) { + $element['#attributes']['class'][] = 'resize-' . $element['#resizable']; + } - // Add resizable behavior. - if (!empty($element['#resizable'])) { - $element['#attributes']['class'][] = 'resize-' . $element['#resizable']; - } + $variables['attributes'] = new Attribute($element['#attributes']); - $variables['attributes']['class'] = array(); - $variables['attributes']['class'][] = 'form-textarea'; - $variables['attributes']['class'] = array_merge($variables['attributes']['class'], $element['#attributes']['class']); - - $variables['value'] = String::checkPlain($element['#value']); + $variables['value'] = String::checkPlain($element['#value']); } /**