froala / angular-froala

Angular.js bindings for Froala WYSIWYG HTML Rich Text Editor.
https://froala.com/wysiwyg-editor
MIT License
306 stars 123 forks source link

ng-model-options updateOn blur not working #174

Closed EmielH closed 5 years ago

EmielH commented 6 years ago

When ng-model-options is not specified, the default behaviour appears to be that the model is updated immediately on blur. When we add ng-model-options to increase the default debounce duration, like so:

ng-model-options="{ updateOn: 'default blur', debounce: { 'default': 3000, 'blur': 0 }}"

the model is not updated on blur anymore. It only is updated after three seconds when the default updateOn fires.

See the following Plunker: https://embed.plnkr.co/XYk38kzcLu4sV1lekEKK/

  1. Click on the Froala editor.
  2. Type some text.
  3. Click outside of the Froala editor. See that the model has not been updated. I expected the model to be updated at this point.
  4. Wait for three seconds. See that the model is updated now.

Tested in Chrome and Firefox.