diff options
| author | Aaron Bohy <aab@odoo.com> | 2017-05-19 10:13:24 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-05-19 15:51:57 +0200 |
| commit | c929a81e8f015f9234f68749a29fe6a9c21577b6 (patch) | |
| tree | 4471550e5f2c70ffe75137d3fc272f97a8e25ef8 /addons/web/static/src/js/views/basic/basic_model.js | |
| parent | a845ecffa13657922ba75dbc7f37c7bad8c0e4c0 (diff) | |
[FIX] web: DebounceField: do nothing after widget destruction
DebounceFields debounce the function that notify field changes to
their environment (using _.debounce). It may happen that this
function is called once the field widget is destroyed (e.g.
type something in a char field and quickly click on Save, the
function is called directly by _commitChanges, but the debounced
call is still pending). It may be a problem if the subsequent
code does something like this.getSession().some_key, as if the
widget is destroyed, it has no parent that can provide it the
session, and thus it crashes.
Also rename attribute _debouncedStarted into _isDirty as it makes
much more sense.
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_model.js')
0 files changed, 0 insertions, 0 deletions
