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

355
Views
No se puede prevenirPredeterminado dentro del detector de eventos pasivo

Estoy usando la lista ordenable de Framework7 y funciona bien, solo que no activa un evento cuando se cambia la lista.

Así que estoy probando algunos eventos integrados:

 $('.sortable-handler').on('touchstart', function (e) { e.preventDefault(); alert('touchstart'); }); $('.sortable-handler').on('touchmove', function (e) { e.preventDefault(); console.log('touchmove'); }); $('.sortable-handler').on('touchcancel', function (e) { e.preventDefault(); console.log('touchcancel'); }); $('.sortable-handler').mouseleave(function (e) { e.preventDefault(); console.log('mouseleave'); });

.. pero todo lo que obtengo es:

No se puede prevenir el detector de eventos pasivo interno predeterminado debido a que el objetivo se trata como pasivo. Consulte https://www.chromestatus.com/features/5093566007214080

¿Qué evento debo buscar para obtener la lista actualizada en cada tipo?

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Vea estaentrada de blog . Si llama a preventDefault en cada touchstart , también debe tener una regla CSS para deshabilitar el desplazamiento táctil como

 .sortable-handler { touch-action: none; }
over 4 years ago · Santiago Trujillo Report

0

Para mí

 document.addEventListener("mousewheel", this.mousewheel.bind(this), { passive: false });

hizo el truco (la parte { passive: false } ).

over 4 years ago · Santiago Trujillo Report

0

En JS simple, agregue { passive: false } como tercer argumento

 document.addEventListener('wheel', function(e) { e.preventDefault(); doStuff(e); }, { passive: false });
over 4 years ago · Santiago Trujillo Report
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!