Currently, the model might get updated and the form set to dirty, as soon the content is loaded. This seems to happen, b/c Trix automatically inserts HTML comments <!--block-->. The issue can be seen here:
Click inside the Trix editor, click outside Trix editor, pristine becomes false. (when removing ng-model-options="{ updateOn: 'blur' }", the form even becomes dirty immediately after load).
This change only updates the model, once the editor has ganined user focus (the Trix modifications have already happened before that point). Result: Forms are not set dirty when there are no actual changes.
Currently, the model might get updated and the form set to dirty, as soon the content is loaded. This seems to happen, b/c Trix automatically inserts HTML comments
<!--block-->
. The issue can be seen here:http://plnkr.co/edit/XQsKXpsH7LZ4m0XBkaR2
Click inside the Trix editor, click outside Trix editor,
pristine
becomesfalse
. (when removingng-model-options="{ updateOn: 'blur' }"
, the form even becomes dirty immediately after load).This change only updates the model, once the editor has ganined user focus (the Trix modifications have already happened before that point). Result: Forms are not set dirty when there are no actual changes.