Skip to content

Commit

Permalink
DEV: Update hasTouchCapabilities in d-tooltip.js (discourse#22388)
Browse files Browse the repository at this point in the history
  • Loading branch information
jancernik authored Jul 3, 2023
1 parent 585a2e4 commit 9bbfb6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/assets/javascripts/discourse/app/lib/d-tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function stopPropagation(instance, event) {
event.stopPropagation();
}
function hasTouchCapabilities() {
return navigator.maxTouchPoints > 0;
return navigator.maxTouchPoints > 1 || "ontouchstart" in window;
}

export default function createDTooltip(target, content) {
Expand Down

0 comments on commit 9bbfb6e

Please sign in to comment.