#1192 ticket.stepone en movil no muestra dropdown
gitea/salix/dev This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2019-04-02 14:18:11 +02:00
parent b86c1afa79
commit 287e4048e2
3 changed files with 6 additions and 3 deletions

View File

@ -17,6 +17,7 @@ class DatePicker extends Component {
locale: locale, locale: locale,
dateFormat: locale == 'es' ? 'd-m-Y' : 'Y-m-d', dateFormat: locale == 'es' ? 'd-m-Y' : 'Y-m-d',
enableTime: false, enableTime: false,
disableMobile: true,
onValueUpdate: () => this.onValueUpdate() onValueUpdate: () => this.onValueUpdate()
}; };
this.userOptions = {}; this.userOptions = {};

View File

@ -24,9 +24,8 @@ export default class Popover extends Component {
this.docKeyDownHandler = e => this.onDocKeyDown(e); this.docKeyDownHandler = e => this.onDocKeyDown(e);
this.docFocusInHandler = e => this.onDocFocusIn(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', this.element.addEventListener('focusin',
e => this.onFocusIn(e)); e => this.onFocusIn(e));
@ -84,6 +83,7 @@ export default class Popover extends Component {
this.document.addEventListener('keydown', this.docKeyDownHandler); this.document.addEventListener('keydown', this.docKeyDownHandler);
this.document.addEventListener('focusin', this.docFocusInHandler); this.document.addEventListener('focusin', this.docFocusInHandler);
this.element.addEventListener('mousedown', this.bgMouseDownHandler);
this.deregisterCallback = this.$transitions.onStart({}, () => this.hide()); this.deregisterCallback = this.$transitions.onStart({}, () => this.hide());
this.relocate(); this.relocate();
@ -107,6 +107,7 @@ export default class Popover extends Component {
this.document.removeEventListener('keydown', this.docKeyDownHandler); this.document.removeEventListener('keydown', this.docKeyDownHandler);
this.document.removeEventListener('focusin', this.docFocusInHandler); this.document.removeEventListener('focusin', this.docFocusInHandler);
this.element.removeEventListener('mousedown', this.bgMouseDownHandler);
if (this.deregisterCallback) if (this.deregisterCallback)
this.deregisterCallback(); this.deregisterCallback();
@ -173,7 +174,7 @@ export default class Popover extends Component {
this.lastMouseEvent = event; this.lastMouseEvent = event;
} }
onBackgroundMouseDown(event) { onBgMouseDown(event) {
if (event != this.lastMouseEvent) if (event != this.lastMouseEvent)
this.hide(); this.hide();
} }

View File

@ -95,6 +95,7 @@ vn-app {
form vn-horizontal { form vn-horizontal {
flex-direction: column; flex-direction: column;
align-items: initial;
} }
} }
vn-main-block { vn-main-block {