diff --git a/app/assets/javascripts/magic-magnifier.js b/app/assets/javascripts/magic-magnifier.js index f671bf45..50aad10e 100644 --- a/app/assets/javascripts/magic-magnifier.js +++ b/app/assets/javascripts/magic-magnifier.js @@ -14,8 +14,8 @@ class MagicMagnifier extends HTMLElement { #onMouseMove(e) { const lens = this.querySelector("magic-magnifier-lens"); const rect = this.getBoundingClientRect(); - const x = e.pageX - rect.left; - const y = e.pageY - rect.top; + const x = e.clientX - rect.left; + const y = e.clientY - rect.top; this.style.setProperty("--magic-magnifier-x", x + "px"); this.style.setProperty("--magic-magnifier-y", y + "px"); }