Fixed #1411 - Filtered Dropdown unusable on Windows Tablet

pull/1478/head
mertsincan 2021-08-25 12:44:49 +03:00
parent 93cc6a8a6e
commit a321ccaa63
2 changed files with 6 additions and 2 deletions

View File

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

View File

@ -140,7 +140,7 @@ export default class DomHandler {
else
return new RegExp('(^| )' + className + '( |$)', 'gi').test(element.className);
}
return false;
}
@ -499,4 +499,8 @@ export default class DomHandler {
static isAndroid() {
return /(android)/i.test(navigator.userAgent);
}
static isTouchDevice() {
return (('ontouchstart' in window) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0));
}
}