angular-elastic
angular-elastic copied to clipboard
added onfocus adjust and refactored bootstrapping
We're dealing with a lot of legacy code. The main problem is that the directive didn't properly adjust when we used it. This was caused by aside-from-angular dom-mutations.
The textarea was displayed later, which required a oninput or onresize to be fired in order to adjust the textarea.
I tried to broadcast the elastic:adjust message. This is a workaround but gave us more maintenance on the code than we wanted to.
The onfocus event does the trick for us.
I refactored the directive to follow the style-guidelines of John Pappa