Avoid shrinking the expandable text area.

This commit is contained in:
Paulo Reis 2017-01-26 11:59:55 +00:00
parent 32b0c6a4fb
commit 1a1320b561
2 changed files with 6 additions and 5 deletions

View file

@ -5,12 +5,12 @@ define [
restrict: "A"
link: (scope, el) ->
resetHeight = () ->
el.css("height", "auto")
el.css("height", el.prop("scrollHeight"))
curHeight = el.outerHeight()
fitHeight = el.prop("scrollHeight")
if fitHeight > curHeight and el.val() != ""
el.css("height", fitHeight)
scope.$watch (() -> el.val()), resetHeight
resetHeight()

View file

@ -451,6 +451,7 @@
resize: vertical;
color: @rp-type-darkgrey;
margin-top: 3px;
overflow-x: hidden;
}
.rp-icon-delete {