diff options
| author | Nasreddin (bon) <bon@odoo.com> | 2021-01-12 12:13:41 +0000 |
|---|---|---|
| committer | Nasreddin (bon) <bon@odoo.com> | 2021-02-02 15:57:03 +0000 |
| commit | 1d9b6f56e70faee13cda0ccb9893ed49904ab319 (patch) | |
| tree | e19b40327396a9c213e0c718de605cede585f071 /addons/web/static/src | |
| parent | 256487ae9bc3701fa7b8e48490ab7d162736acbf (diff) | |
[FIX] web: Not hide daterange if scrolling on mobile + unit test
Issue
- Install "Field Service" app
- Create new task
- Try to select Planned start/end date and valid
Daterange picker is hiding when trying to scroll down to valid selection.
Cause
The daterange picker is closed when ev.target is not inside the picker,
however ev.target always return the document element.
Solution
Do not hide daterange picker on scrolling if on mobile.
Note : It will only apply if scrolling on the daterange picker and
will still hide if scrolling outside this last one.
opw-2428099
closes odoo/odoo#65423
X-original-commit: fb01006342c6d6fd902e13a5f4c2642c87fe452d
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/fields/basic_fields.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js index ddda72e59db..99e65b444c5 100644 --- a/addons/web/static/src/js/fields/basic_fields.js +++ b/addons/web/static/src/js/fields/basic_fields.js @@ -756,7 +756,7 @@ var FieldDateRange = InputField.extend({ */ _onDateRangePickerShow() { this._onScroll = ev => { - if (!this.$pickerContainer.get(0).contains(ev.target)) { + if (!config.device.isMobile && !this.$pickerContainer.get(0).contains(ev.target)) { this.$el.data('daterangepicker').hide(); } }; |
