JSFiddle - React, Tailwind, and code Playground

by Alex Alex

HTML

Tap and hold!

CSS

body {height: 100%; background: red; color: white}

JavaScript

if (window.navigator.pointerEnabled) {
    alert('pointerEnabled');
    document.body.addEventListener("pointerup", function () {
        alert('pointerup');
    }, false);
} else if (window.navigator.msPointerEnabled) {
    alert('msPointerEnabled');
    document.body.addEventListener("MSPointerUp", function () {
        alert('MSPointerUp')
    }, false);
}