diff options
| author | Michael Mattiello (mcm) <mcm@odoo.com> | 2020-03-27 10:56:05 +0000 |
|---|---|---|
| committer | Michael Mattiello (mcm) <mcm@odoo.com> | 2020-03-31 07:11:01 +0000 |
| commit | 9324282b0118e311382ee9a57cd10ef3f02d1dbb (patch) | |
| tree | b4663f82c2e837ba23f70b562b6dfd743b96167f /addons/web/static/src/js/views/form | |
| parent | 91c7e574ed4a08a4d9998a7f5f481b99ae6154ee (diff) | |
[REF] web,*: add new field registry for components
* account
This commit adds a new field registry for component fields.
This field registry is used to only register the new field components
and the other one should register the legacy fields.
Those two registries will be used together while all legacy fields are
not converted to owl component.
As the legacy registry now throws an error when adding a component
field the existing component fields (account.ShowGroupedList and
account.ShowResequenceRenderer) are moved into the new registry.
This commit also refactors some field managers (form renderer, list
editable renderer, calendar popover) to use the new registry and thus
support the component fields.
task id: 2193996
Diffstat (limited to 'addons/web/static/src/js/views/form')
| -rw-r--r-- | addons/web/static/src/js/views/form/form_renderer.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/addons/web/static/src/js/views/form/form_renderer.js b/addons/web/static/src/js/views/form/form_renderer.js index bcab9808773..a258d16a917 100644 --- a/addons/web/static/src/js/views/form/form_renderer.js +++ b/addons/web/static/src/js/views/form/form_renderer.js @@ -1065,6 +1065,13 @@ var FormRenderer = BasicRenderer.extend({ */ _onNavigationMove: function (ev) { ev.stopPropagation(); + // We prevent the default behaviour and stop the propagation of the + // originalEvent when the originalEvent is a tab keydown to not let + // the browser do it. The action is done by this renderer. + if (ev.data.originalEvent && ['next', 'previous'].includes(ev.data.direction)) { + ev.data.originalEvent.preventDefault(); + ev.data.originalEvent.stopPropagation(); + } var index; let target = ev.data.target || ev.target; if (target.__owl__) { |
