Fixed #1180 - Dropdown and Multiselect with filter fails in Android

pull/1227/head
Tuğçe Küçükoğlu 2021-04-28 10:35:18 +03:00
parent c5650518fa
commit 064c647b7b
2 changed files with 8 additions and 3 deletions

View File

@ -465,7 +465,7 @@ export default {
bindResizeListener() {
if (!this.resizeListener) {
this.resizeListener = () => {
if (this.overlayVisible) {
if (this.overlayVisible && !DomHandler.isAndroid()) {
this.hide();
}
};

View File

@ -37,7 +37,7 @@
</div>
</div>
<div v-if="filter" class="p-multiselect-filter-container">
<input type="text" v-model="filterValue" class="p-multiselect-filter p-inputtext p-component" :placeholder="filterPlaceholder" @input="onFilterChange">
<input type="text" ref="filterInput" v-model="filterValue" class="p-multiselect-filter p-inputtext p-component" :placeholder="filterPlaceholder" @input="onFilterChange">
<span class="p-multiselect-filter-icon pi pi-search"></span>
</div>
<button class="p-multiselect-close p-link" @click="onCloseClick" type="button" v-ripple>
@ -351,6 +351,11 @@ export default {
this.bindOutsideClickListener();
this.bindScrollListener();
this.bindResizeListener();
if (this.filter) {
this.$refs.filterInput.focus();
}
this.$emit('show');
},
onOverlayLeave() {
@ -407,7 +412,7 @@ export default {
bindResizeListener() {
if (!this.resizeListener) {
this.resizeListener = () => {
if (this.overlayVisible) {
if (this.overlayVisible && !DomHandler.isAndroid()) {
this.hide();
}
};