mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-18 01:41:28 -05:00
16 lines
277 B
CoffeeScript
16 lines
277 B
CoffeeScript
|
define [
|
||
|
"base"
|
||
|
], (App) ->
|
||
|
App.directive "expandableTextArea", () ->
|
||
|
restrict: "A"
|
||
|
link: (scope, el) ->
|
||
|
resetHeight = () ->
|
||
|
el.css("height", "auto")
|
||
|
el.css("height", el.prop("scrollHeight"))
|
||
|
|
||
|
scope.$watch (() -> el.val()), resetHeight
|
||
|
|
||
|
resetHeight()
|
||
|
|
||
|
|
||
|
|