From 287e4048e2e004f8b98c5266a9d96dc8ee1ec5e6 Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Tue, 2 Apr 2019 14:18:11 +0200 Subject: [PATCH] #1192 ticket.stepone en movil no muestra dropdown --- front/core/components/date-picker/date-picker.js | 1 + front/core/components/popover/popover.js | 7 ++++--- front/salix/components/app/style.scss | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/front/core/components/date-picker/date-picker.js b/front/core/components/date-picker/date-picker.js index 80a8072ad..1156ab09a 100644 --- a/front/core/components/date-picker/date-picker.js +++ b/front/core/components/date-picker/date-picker.js @@ -17,6 +17,7 @@ class DatePicker extends Component { locale: locale, dateFormat: locale == 'es' ? 'd-m-Y' : 'Y-m-d', enableTime: false, + disableMobile: true, onValueUpdate: () => this.onValueUpdate() }; this.userOptions = {}; diff --git a/front/core/components/popover/popover.js b/front/core/components/popover/popover.js index f1f948512..ea864ca88 100644 --- a/front/core/components/popover/popover.js +++ b/front/core/components/popover/popover.js @@ -24,9 +24,8 @@ export default class Popover extends Component { this.docKeyDownHandler = e => this.onDocKeyDown(e); this.docFocusInHandler = e => this.onDocFocusIn(e); + this.bgMouseDownHandler = e => this.onBgMouseDown(e); - this.element.addEventListener('mousedown', - e => this.onBackgroundMouseDown(e)); this.element.addEventListener('focusin', e => this.onFocusIn(e)); @@ -84,6 +83,7 @@ export default class Popover extends Component { this.document.addEventListener('keydown', this.docKeyDownHandler); this.document.addEventListener('focusin', this.docFocusInHandler); + this.element.addEventListener('mousedown', this.bgMouseDownHandler); this.deregisterCallback = this.$transitions.onStart({}, () => this.hide()); this.relocate(); @@ -107,6 +107,7 @@ export default class Popover extends Component { this.document.removeEventListener('keydown', this.docKeyDownHandler); this.document.removeEventListener('focusin', this.docFocusInHandler); + this.element.removeEventListener('mousedown', this.bgMouseDownHandler); if (this.deregisterCallback) this.deregisterCallback(); @@ -173,7 +174,7 @@ export default class Popover extends Component { this.lastMouseEvent = event; } - onBackgroundMouseDown(event) { + onBgMouseDown(event) { if (event != this.lastMouseEvent) this.hide(); } diff --git a/front/salix/components/app/style.scss b/front/salix/components/app/style.scss index d2d4e516e..d9638df17 100644 --- a/front/salix/components/app/style.scss +++ b/front/salix/components/app/style.scss @@ -95,6 +95,7 @@ vn-app { form vn-horizontal { flex-direction: column; + align-items: initial; } } vn-main-block {