From 3d5766b1539c950ceabc29234b8ce0b59b477ee1 Mon Sep 17 00:00:00 2001
From: Marius <tzyganu@gmail.com>
Date: Thu, 26 Mar 2015 23:00:53 +0200
Subject: [PATCH] default cols & rows for textareas

---
 .../Framework/Data/Form/Element/Textarea.php  | 21 +++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Textarea.php b/lib/internal/Magento/Framework/Data/Form/Element/Textarea.php
index 724a609189b..cf56737b752 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Textarea.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Textarea.php
@@ -15,6 +15,19 @@ use Magento\Framework\Escaper;
 
 class Textarea extends AbstractElement
 {
+    /**
+     * default number of rows
+     *
+     * @var int
+     */
+    const DEFAULT_ROWS = 2;
+    /**
+     * default number of cols
+     *
+     * @var int
+     */
+    const DEFAULT_COLS = 15;
+
     /**
      * @param Factory $factoryElement
      * @param CollectionFactory $factoryCollection
@@ -30,8 +43,12 @@ class Textarea extends AbstractElement
         parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
         $this->setType('textarea');
         $this->setExtType('textarea');
-        $this->setRows(2);
-        $this->setCols(15);
+        if (!$this->getRows()) {
+            $this->setRows(self::DEFAULT_ROWS);
+        }
+        if (!$this->getCols()) {
+            $this->setCols(self::DEFAULT_COLS);
+        }
     }
 
     /**
-- 
GitLab