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

96
Views
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
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!