From ac490b1b3e4d9c74b8d4de281b8fd511874d7d6c Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Fri, 5 May 2017 11:01:53 +0200 Subject: [FIX] web: better factorize debounced/input fields code `DebouncedField` and `InputField` classes were not properly factorized, some of the DebouncedField code had to be part of the `InputField` class (which is a specialization of `DebouncedField`). Indeed the `FieldText` class, specialization of `DebouncedField` class, was missing properties which were part of `InputField` and was duplicating code which was already defined in `InputField`. For example, it was not possible to navigate out of text fields in editable list views with the right/left keys as this was part of the `InputField` class. Note: the FieldTextHtmlSimple class was implementing the `commitChanges` function differently than `DebouncedField` but this was in fact not necessary. This is why documentation update has also been done for this by this commit. --- addons/web/static/src/js/views/basic/basic_renderer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'addons/web/static/src/js/views/basic/basic_renderer.js') diff --git a/addons/web/static/src/js/views/basic/basic_renderer.js b/addons/web/static/src/js/views/basic/basic_renderer.js index 3f0c67c7e70..65f444ad7b3 100644 --- a/addons/web/static/src/js/views/basic/basic_renderer.js +++ b/addons/web/static/src/js/views/basic/basic_renderer.js @@ -59,7 +59,8 @@ var BasicRenderer = AbstractRenderer.extend({ /** * Calls 'commitChanges' on all field widgets, so that they can notify the * environment with their current value (useful for widgets that can't - * detect when their value changes, e.g. field 'html'). + * detect when their value changes or that have to validate their changes + * before notifying them). * * @param {string} recordID * @return {Deferred} -- cgit v1.2.3