Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

117
Views
Navegador Firefox compensado X/Y

 const $test = document.querySelector('.test'); function sleep() { return new Promise(resolve => { setTimeout(() => { resolve(); }, 300); }); } $test.addEventListener('mousedown', async e => { console.log(e.offsetX, e.offsetY); // (90, 163) any other values but not 0 await sleep(); console.log(e.offsetX, e.offsetY); // 0 0 });
 #app { position: relative; width: 100vw; height: 100vh; } .test { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 300px; height: 300px; background-color: aqua; }
 <div id="app"> <div class="test"></div> <!-- <canvas width="300" height="300" class="test"></canvas> --> </div>

#Nota Está bien en el navegador de Google, pero hay un error en el navegador de Firefox.

  1. El offsetX/Y tiene valor antes de dormir.
  2. El valor de offsetX/Y se convierte en 0.

puede alguien decirme por que?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!