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

110
Views
La navegación por pestañas de CKEditor4 funciona con Chrome, pero no con Firefox

Tengo un problema con CKEditor4, donde al atravesar los elementos enfocables en el modal está en Firefox, después de salir del editor, el enfoque cambia al cuerpo modal en lugar del siguiente elemento enfocable. Al probar lo mismo con Chrome, la navegación por pestañas funciona como debería.

Intenté capturar los eventos clave de la instancia del editor y luego mover manualmente el enfoque al siguiente elemento enfocable, y aunque reconoce que se presionó la tecla de tabulación dentro del editor y ser consciente del siguiente elemento enfocable, todavía solo se mueve el foco al cuerpo modal. ¿Alguien tiene idea de cuál puede ser el problema?

Aquí está el código que probé para manejar el enfoque manualmente, que no resolvió el problema:

 $.each(CKEDITOR.instances, function(i, instance) { var focusableTags = 'button, [href]:not([tabindex="-1"]), input, select, textarea :not([display="none"]), [tabindex]:not([tabindex="-1"])'; instance.on('key', function(e) { var activeElement = document.activeElement; var modal = document.querySelector(".modal"); var modal = parent.window.document.querySelector(".modal"); var focusableContent = modal.querySelectorAll(focusableTags); var activeIndex = 0; Array.prototype.forEach.call(focusableContent, function(element, i) { if(element === activeElement) { activeIndex = i; } }) var prevFocusable = focusableContent[activeIndex-1]; var nextFocusable = focusableContent[activeIndex+1]; var keyEvent = e.data.domEvent.$; var isTabPressed = keyEvent.key === "Tab" || keyEvent.keyCode === 9; if (!isTabPressed) { return; } if (keyEvent.shiftKey) { // if shift key pressed for shift + tab combination keyEvent.preventDefault(); prevFocusable.focus(); } else { // if tab key is pressed keyEvent.preventDefault(); nextFocusable.focus(); } }) })
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!