Skip to content
Snippets Groups Projects
Commit a8d1a9a7 authored by fja-odoo's avatar fja-odoo Committed by qsm-odoo
Browse files

[IMP] web_tour: add new "text_blur" action for tours' run method

The 'text' helper does not focus out of the inputs after adding the
text. The new 'text_blur' one will.

It will be needed for future tasks of the website editor since the
inputs in the left panel are only considered on blur or on ENTER.
See https://github.com/odoo/odoo/pull/42189

 for example.

closes odoo/odoo#43337

Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
parent daaf5f00
Branches
Tags
No related merge requests found
......@@ -28,6 +28,9 @@ var RunningTourActionHelper = core.Class.extend({
text: function (text, element) {
this._text(this._get_action_values(element), text);
},
text_blur: function (text, element) {
this._text_blur(this._get_action_values(element), text);
},
drag_and_drop: function (to, element) {
this._drag_and_drop(this._get_action_values(element), to);
},
......@@ -106,6 +109,11 @@ var RunningTourActionHelper = core.Class.extend({
}
values.$element.trigger("change");
},
_text_blur: function (values, text) {
this._text(values, text);
values.$element.trigger('focusout');
values.$element.trigger('blur');
},
_drag_and_drop: function (values, to) {
var $to;
if (to) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment