From b6017386aeba7f2a03ef463d074bbd99d027c270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 4 Apr 2018 23:06:56 +0200 Subject: [PATCH] Set overflow on closest .treeview when datetimepicker is shown This applies the same technique as for completion. issue5967 review44861002 --- src/view/form.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/view/form.js b/src/view/form.js index 4aaa20b070..f907bb4b8b 100644 --- a/src/view/form.js +++ b/src/view/form.js @@ -1476,6 +1476,16 @@ function eval_pyson(value){ }); this.date.css('max-width', this._width); this.date.on('dp.change', this.focus_out.bind(this)); + // We must set the overflow of the treeview containing the input to + // visible to prevent vertical scrollbar inherited from the auto + // overflow-x + // (see http://www.w3.org/TR/css-overflow-3/#overflow-properties) + this.date.on('dp.hide', function() { + this.date.closest('.treeview').css('overflow', ''); + }.bind(this)); + this.date.on('dp.show', function() { + this.date.closest('.treeview').css('overflow', 'visible'); + }.bind(this)); var mousetrap = new Mousetrap(this.el[0]); mousetrap.bind(['enter', '='], function(e, combo) {