diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2019-02-13 17:15:58 +0000 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2019-02-13 17:21:19 +0000 |
| commit | 0857737f8c5c2adf4f4f96cc203169c04e27d720 (patch) | |
| tree | 088094dd158996d79f3c31770e8e30ee400a66d2 /addons/web_editor/static/src | |
| parent | 1e43c73a9983d48d85b899d6db323290e961a84c (diff) | |
[FIX] web_editor: focus lost with inline editor
When an inline editor is eg. in a form view, the focus is always stolen
by it.
This is because we trigger a mouseup on the editor to update its
toolbars values and informations.
note: backport of 11.0's 7a453b0b7ae
In 10.0 this trigger could cause a "blur" which in some instance is not
wanted (eg. inside a newline of a list view).
opw-1906581
closes #31078
Diffstat (limited to 'addons/web_editor/static/src')
| -rw-r--r-- | addons/web_editor/static/src/js/backend.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/backend.js b/addons/web_editor/static/src/js/backend.js index 9e627dd9646..884ef68d674 100644 --- a/addons/web_editor/static/src/js/backend.js +++ b/addons/web_editor/static/src/js/backend.js @@ -57,7 +57,8 @@ var FieldTextHtmlSimple = widget.extend({ this.$translate.remove(); this.$translate = $(); // Triggers a mouseup to refresh the editor toolbar - this.$content.trigger('mouseup'); + var mouseupEvent = $.Event('mouseup', {'setStyleInfoFromEditable': true}); + this.$content.trigger(mouseupEvent); return def; }, initialize_content: function () { |
