Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

98
Visualizações
Firefox is triggering inputevent on textarea on new window opened with CTRL + Back/Forward/Refresh Button

I strip my app till I isolate the problem. I have a simple page with a script file. If I open the file in browser, everything is OK. But, (with file opened in browser) if I press CTRL and click Back/Forward/Refresh, then Firefox will open a new file. The problem is that in console log will appear the message "Hmmm...". Somehow Firefox will trigger inputevent on textarea on new window. Firefox version is 93.0 (64). Chrome is OK.

index.html

<!doctype html> 
<html> 
<head>
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
<script defer src="myscript.js" type="text/javascript"></script>
</head>
<body>
<textarea id="mytext"></textarea>
</body>
</html>

myscript.js

$('#mytext').on('input', function (){
console.log("Hmmm...");
});

Where is the problem? Why Firefox is triggering inputevent on textarea on new window?

PS A simple fix is to drop the defer attribute, but, in the original app I want to load this file at the end. Something is wrong but i do not understand what is wrong.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda