scottschiller / ArmorAlley

A browser-based interpretation of Armor Alley, a combat strategy game originally released in 1990 for the Macintosh and MS-DOS PCs.
https://armor-alley.net/
Other
91 stars 25 forks source link

Opening and closing Options dialog sometimes causes page reload #16

Closed artfoundry closed 5 months ago

artfoundry commented 5 months ago

If you open the Options, don't change anything or change some options, and click OK, the page reloads. This happens on the title screen or in game. It seems inconsistent which options WON'T cause the reload - it's very odd. Also, if the page reloads, the options you changed before the reload are sometimes saved, but not always. Issue also occurs if the network dialog is opened (which I realize is just an altered version of the options dialog).

artfoundry commented 5 months ago

It does seem like the more you play with it the worse it gets - in Safari (unable to test in Chrome now - see my comment in my other issue about game not starting), changing any option and closing the dialog is now causing reload. Actually, I did clear out local and session storages and cookies in Safari for the page, so that could be what made it worse... 😅

scottschiller commented 5 months ago

Thanks for the report, something definitely sounds off. I haven't been able to reproduce any of this, yet.

If you open the network modal, that one will reload the page if you "cancel" from there as it exists only to start a network game from the splash screen.

If you open the regular options modal 🛠️ that shouldn't cause a reload.

When the screen is below 900px wide, the options and network are shown as one button to save space. You have to click "network setup" from that modal, and then you'll get the network-specific modal in that case which causes the reload.

artfoundry commented 5 months ago

Looks like the change you made for the Chrome freeze issue fixed both this issue and that one 🦜🦜🪨

scottschiller commented 5 months ago

Ah, good! Thanks. I realized I may not have pushed some image asset changes and that might have been related, too.