Same for the 'pointerup' event. In this case you need to also register 'click' with preventDefault(). I guess there is a similar problem for 'pointermove'.
[("pointerup", "click")].forEach(function (eventType) {
document.querySelector(".button.pointerup-click").addEventListener(
eventType,
function (event) {
event.preventDefault();
alert("pointerup click event!");
},
false
);
});
html {
font-family: sans-serif;
}
.button {
display: inline-block;
padding: 0.85em;
margin-bottom: 2rem;
background: blue;
color: white;
}
<a href="https://www.drupal.org" class="button pointerup-click">'pointerup click' Event</a>
See ('pointerupclick'): https://codepen.io/thomas-frobieter/pen/qEdNoEr