Works with non-textarea (for inline) and multiple elements (ng-repeat)