I'm working on a demo shopping list app that teaches students about event listeners and dom manipulation with jQuery and came across a strange bug.

In this repl.it (https://repl.it/Ht9G/26), when you submit a new item to the shopping list, it gets added twice because the form submits twice.

Crucially, in this replit, I've renamed index.js to app.js, and link to app.js from index.html. I did this because I'm porting a local project over to repl.it, and I happened to call the js file app.js locally.

Through trial and error, I figured out that the double firing for submission events goes away if I call the JS file index.js, which is the default name for JavaScript files in the web project environment. You can verify this by renaming app.js to index.js in the replit linked to above, and then updating the index.html script linking to the JS.

This seems like a pretty major bug. If the web project environment needs JS files to be called index.js, then you should be disallowed from renaming, and presumably also disallowed from using more than one js file.

FWIW, posted same info on GitHub: https://github.com/replit/repl.it/issues/182