angular-elastic icon indicating copy to clipboard operation
angular-elastic copied to clipboard

How to ensure sizing adjusted when text area is initially hidden

Open GeoffCox opened this issue 9 years ago • 2 comments

I found that the initial size is not adjusted properly if the textarea starts out hidden and is then shown via an ng-show (or ng-hide) binding later.

Adding this line fixes the problem in some cases:

scope.$watch(attrs.ngShow, forceAdjust);

I added this right after

$win.bind('resize', forceAdjust);

GeoffCox avatar Jan 29 '16 18:01 GeoffCox

Did you add the above code in elastic.js or your own code? I'm having the same issue.

markediez avatar Mar 10 '16 22:03 markediez

I ran into this as well. Using ng-if was a pretty painless workaround for myself.

jjoekoullas avatar Jul 28 '16 00:07 jjoekoullas

Archiving repository.

monospaced avatar Sep 21 '22 12:09 monospaced