diff options
| author | Vincent Schippefilt <vsc@odoo.com> | 2018-04-12 16:38:14 +0200 |
|---|---|---|
| committer | Vincent Schippefilt <vsc@odoo.com> | 2018-04-16 09:35:33 +0200 |
| commit | 65d8a082df02d72a37c5e9d06539a69adab04c4a (patch) | |
| tree | 2a3781ecc09adce9cf796a2f7a1faef568ca3e75 /addons/web/static/src/js | |
| parent | 9b2b5eddd4d6feac3926da8242d0b063bb26c9ed (diff) | |
[FIX] web: fix keyboard related crash in client actions
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/chrome/abstract_action.js | 5 | ||||
| -rw-r--r-- | addons/web/static/src/js/fields/basic_fields.js | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/addons/web/static/src/js/chrome/abstract_action.js b/addons/web/static/src/js/chrome/abstract_action.js index eb305b3a0d0..8c06d887431 100644 --- a/addons/web/static/src/js/chrome/abstract_action.js +++ b/addons/web/static/src/js/chrome/abstract_action.js @@ -52,6 +52,11 @@ var AbstractAction = Widget.extend({ return $.when(); }, /** + * Gives the focus to the action + */ + giveFocus: function () { + }, + /** * Renders the buttons to append, in most cases, to the control panel (in * the bottom left corner). When the action is rendered in a dialog, those * buttons might be moved to the dialog's footer. diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js index ae0da5427ad..0f426dedd3b 100644 --- a/addons/web/static/src/js/fields/basic_fields.js +++ b/addons/web/static/src/js/fields/basic_fields.js @@ -319,7 +319,9 @@ var InputField = DebouncedField.extend({ || (ev.data.direction === "right" && (selecting || input.selectionStart !== input.value.length))) { ev.stopPropagation(); } - if (ev.data.direction ==='next' && this.attrs.modifiersValue.required) { + if (ev.data.direction ==='next' && + this.attrs.modifiersValue && + this.attrs.modifiersValue.required) { if (!this.$input.val()){ this.setInvalidClass(); ev.stopPropagation(); |
