summaryrefslogtreecommitdiff
path: root/addons/web/static/lib
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2019-04-11 13:35:49 +0000
committerAaron Bohy <aab@odoo.com>2019-04-23 06:58:16 +0000
commit3c40d732bf03c8b656ab170319425f02fddfb2f4 (patch)
treee59428c195f15fef590215f4da4f32f3665052ab /addons/web/static/lib
parentb130b35f048c6fbe9dd0ee1b076541e47b5788ad (diff)
[FIX] web: crash in editable lists with date field
Backport of 7bc53ac30e. Assume an editable list view with a date(time) widget, click to edit a line, focus the date field (the datepicker opens), press ESC: there is a crash in the lib, and the datepicker remains open forever. This fix is twofold: - we added a check in the lib to prevent it from crashing (it is easily reproducible: it crashes when an opened datepicker is removed from the DOM). - we added an event handler of ESC keydown event to hide the datepicker before the field is removed from the DOM. closes odoo/odoo#32647 Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
Diffstat (limited to 'addons/web/static/lib')
-rw-r--r--addons/web/static/lib/tempusdominus/tempusdominus.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web/static/lib/tempusdominus/tempusdominus.js b/addons/web/static/lib/tempusdominus/tempusdominus.js
index ffca0c8e632..4eaf0df2a60 100644
--- a/addons/web/static/lib/tempusdominus/tempusdominus.js
+++ b/addons/web/static/lib/tempusdominus/tempusdominus.js
@@ -2754,7 +2754,8 @@ var TempusDominusBootstrap4 = function ($) {
if ($target.length === 0) {
return;
}
- if (config._options.debug || window.debug) {
+ // /!\ ODOO FIX: check on 'config' existence added by odoo
+ if (config && config._options.debug || window.debug) {
return;
}
TempusDominusBootstrap4._jQueryInterface.call($target, 'hide', event);