fixed order of functions to fix IOS bug with lost margin after setting height on textarea