Web editor switches back to previous file after saving and switching files
p5.js version
1.11.3
What is your operating system?
Chromebook
Web browser and version
Chrome
Actual Behavior
When editing sketch files: pressing ctrl+S to save the changes and immediately navigate to a different file before it finishes saving. The web editor switches to the previous file at the same time the "sketch saved" message appears despite the user not having commanded the file switch.
https://github.com/user-attachments/assets/3c06d3f2-9fbe-4888-9daa-14d8f084c9da
Expected Behavior
The editor should not switch to the previous file without user input.
Steps to reproduce
Steps:
- open a p5js web editor project
- press SAVE, ctrl+S, or trigger an autosave, then immediately navigate to another sketch file BEFORE the "sketch saved" message appears.
- When the "sketch saved" message appears, the web editor will navigate back to the file you were on when you triggered the save, without any user input.
sample project: https://editor.p5js.org/davidjramirez04/sketches/sIEIjaKEI Hyperkhukku battle simulator (google it)
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.
Hey! Thanks for flagging this! I've verified i can recreate the issue, although it seems like a rare edge case so I've labelled it low priority for now.
hi @khanniie i would like to work on this issue can you assign it to me