DEV: Update hasTouchCapabilities in d-tooltip.js (#22388)

This commit is contained in:
Jan Cernik 2023-07-03 11:45:06 -03:00 committed by GitHub
parent 585a2e4e77
commit 9bbfb6e171
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@ function stopPropagation(instance, event) {
event.stopPropagation(); event.stopPropagation();
} }
function hasTouchCapabilities() { function hasTouchCapabilities() {
return navigator.maxTouchPoints > 0; return navigator.maxTouchPoints > 1 || "ontouchstart" in window;
} }
export default function createDTooltip(target, content) { export default function createDTooltip(target, content) {