[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: Aaron Bohy (aab) <aab@odoo.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user