Commit eaf6d492 authored by csillag's avatar csillag

Fix #503 by working around mysterious angular problem in markdown directive.

parent 6aae9453
......@@ -61,6 +61,7 @@ markdown = ['$filter', '$timeout', ($filter, $timeout) ->
# React to the changes to the text area
input.bind 'blur change keyup', ->
attr.required = scope.realRequired
ctrl.$setViewValue input[0].value
scope.$digest()
......@@ -70,6 +71,10 @@ markdown = ['$filter', '$timeout', ($filter, $timeout) ->
ctrl.$render()
unless readonly then $timeout -> input.focus()
# We save the required field, since it magically changes later on.
# No idea why this happens; until we find out, this is a workaround.
scope.realRequired = scope.required
require: '?ngModel'
restrict: 'E'
scope:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment