fixed compatibility on hybrid device.

This commit is contained in:
DESKTOP-GENO133\IvanPlex
2024-02-21 15:51:38 -07:00
parent 2f52ed64ba
commit 9a44d80be4

View File

@@ -696,11 +696,18 @@ function clearSelectedRows() {
selectedRow = [];
$('.table tr').removeClass('table-active');
}
function getDeviceIsTouchOnly() {
if (navigator.maxTouchPoints > 0 && matchMedia('(pointer: coarse)').matches && !matchMedia('(any-pointer: fine)').matches) {
return true;
} else {
return false;
}
}
function showTableContextMenu(e) {
if (event != undefined) {
event.preventDefault();
}
if (navigator.maxTouchPoints > 0) {
if (getDeviceIsTouchOnly()) {
return;
}
$(".table-context-menu").show();