From 38e9e2edaf45b275d5544c1f919e34d42a4e3f9a Mon Sep 17 00:00:00 2001 From: Jonathan la Cour Date: Wed, 6 Jan 2016 11:45:15 -0700 Subject: [PATCH 1/2] Support vertical textarea scaling --- gridforms/gridforms.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gridforms/gridforms.js b/gridforms/gridforms.js index fb9afeb..3d2a55b 100644 --- a/gridforms/gridforms.js +++ b/gridforms/gridforms.js @@ -72,6 +72,11 @@ $(function() { // Get the height of the row (thus the tallest element's height) var fieldRow = $(this); var rowHeight = fieldRow.css('height'); + + // Singleton textarea rows should determine their row height + if (fieldRow.children().children("textarea").length === 1) { + return; + } // Set the height for each field in the row... fieldRow.find(fieldsContainers).css('height', rowHeight); From 735a19a0f53282f97869eb2df7e43e42be5bc84b Mon Sep 17 00:00:00 2001 From: Jonathan la Cour Date: Fri, 8 Jan 2016 10:01:38 -0700 Subject: [PATCH 2/2] Improved logic for textarea scaling support --- gridforms/gridforms.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gridforms/gridforms.js b/gridforms/gridforms.js index 3d2a55b..5d4f69a 100644 --- a/gridforms/gridforms.js +++ b/gridforms/gridforms.js @@ -74,9 +74,9 @@ $(function() { var rowHeight = fieldRow.css('height'); // Singleton textarea rows should determine their row height - if (fieldRow.children().children("textarea").length === 1) { - return; - } + var rowInputs = fieldRow.children(); + var textAreas = rowInputs.children("textarea"); + if (rowInputs.length === 1 && textAreas.length === 1) return; // Set the height for each field in the row... fieldRow.find(fieldsContainers).css('height', rowHeight);