Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

e.pageX/e.clientX and e.pageY/e.clientY are always 0 for ondrag & ondragend events

  • No replies
  • 1 has this problem
  • 1 view
more options

As the Title says, I can't get the Position of both events, because e.pageX/e.clientX and e.pageY/e.clientY are always null. It works perfectly in Chromium, but not with Firefox. Is this just not implemented yet, or ist this a Bug?

This is my Code: htmlElement.addEventListener('drag', handleDrag, false); function handleDrag(e) { console.log('position: x=' + e.pageX + ' y=' + e.pageY); }

As the Title says, I can't get the Position of both events, because e.pageX/e.clientX and e.pageY/e.clientY are always null. It works perfectly in Chromium, but not with Firefox. Is this just not implemented yet, or ist this a Bug? This is my Code: htmlElement.addEventListener('drag', handleDrag, false); function handleDrag(e) { console.log('position: x=' + e.pageX + ' y=' + e.pageY); }