Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(textarea): only compute style on textarea setup
Browse files Browse the repository at this point in the history
  • Loading branch information
devversion committed Nov 28, 2015
1 parent a57b716 commit 7630498
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/input/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,15 +296,15 @@ function inputTextareaDirective($mdUtil, $window, $mdAria) {
element.on('scroll', onScroll);
}

// Trigger the input event to compute style
element.triggerHandler('input');

angular.element($window).on('resize', onChangeTextarea);

scope.$on('$destroy', function() {
angular.element($window).off('resize', onChangeTextarea);
});

// Trigger the input event to compute style
element.triggerHandler('input');

function growTextarea() {
// sets the md-input-container height to avoid jumping around
container.style.height = container.offsetHeight + 'px';
Expand Down

0 comments on commit 7630498

Please sign in to comment.