79650873

Date: 2025-06-03 08:26:33
Score: 0.5
Natty:
Report link

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

Reasons:
  • Contains signature (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Thomas