assets/javascripts/materialize/forms.js in materialize-sass-1.0.0.alpha1 vs assets/javascripts/materialize/forms.js in materialize-sass-1.0.0.alpha2

- old
+ new

@@ -48,24 +48,38 @@ // Set font properties of hiddenDiv var fontFamily = $textarea.css('font-family'); var fontSize = $textarea.css('font-size'); var lineHeight = $textarea.css('line-height'); - var padding = $textarea.css('padding'); + // Firefox can't handle padding shorthand. + var paddingTop = $textarea.css('padding-top'); + var paddingRight = $textarea.css('padding-right'); + var paddingBottom = $textarea.css('padding-bottom'); + var paddingLeft = $textarea.css('padding-left'); + if (fontSize) { hiddenDiv.css('font-size', fontSize); } if (fontFamily) { hiddenDiv.css('font-family', fontFamily); } if (lineHeight) { hiddenDiv.css('line-height', lineHeight); } - if (padding) { - hiddenDiv.css('padding', padding); + if (paddingTop) { + hiddenDiv.css('padding-top', paddingTop); } + if (paddingRight) { + hiddenDiv.css('padding-right', paddingRight); + } + if (paddingBottom) { + hiddenDiv.css('padding-bottom', paddingBottom); + } + if (paddingLeft) { + hiddenDiv.css('padding-left', paddingLeft); + } // Set original-height, if none if (!$textarea.data('original-height')) { $textarea.data('original-height', $textarea.height()); } @@ -199,12 +213,9 @@ $(document).on('keyup', text_area_selector, function () { M.textareaAutoResize($(this)); }); $(document).on('keydown', text_area_selector, function () { - M.textareaAutoResize($(this)); - }); - $(document).on('autoresize', text_area_selector, function () { M.textareaAutoResize($(this)); }); // File Input Path $(document).on('change', '.file-field input[type="file"]', function () {