diff options
| author | fja-odoo <fja@odoo.com> | 2020-01-15 12:17:04 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-01-15 12:17:04 +0000 |
| commit | a8d1a9a782ab35bfeb4c25ede30b0e95d663fc2c (patch) | |
| tree | ed22c0892c59513af6d485731d09fe76185bfc18 /addons/web_tour/static | |
| parent | daaf5f00d201c730dc12f8ad0cfec73f1d4f84da (diff) | |
[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>
Diffstat (limited to 'addons/web_tour/static')
| -rw-r--r-- | addons/web_tour/static/src/js/running_tour_action_helper.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/addons/web_tour/static/src/js/running_tour_action_helper.js b/addons/web_tour/static/src/js/running_tour_action_helper.js index 794f346e750..a034d506622 100644 --- a/addons/web_tour/static/src/js/running_tour_action_helper.js +++ b/addons/web_tour/static/src/js/running_tour_action_helper.js @@ -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) { |
