Description
Bug description
When changing anything in the user preferences, Chromium browsers will always complain that the page is "dirty".
How to reproduce
- Go to a Statamic site using a Chromium browser such as Chrome, Edge, or Arc. This can even be a newly installed vanilla Statamic site.
- Log into the CP
- Go to the User > Preferences page
- Pick or change your Locale
- Click Save
The expected behavior is that the preferences are saved with no warnings from the browser. This is, in fact, what happens when using Safari on a Mac.
The actual result is that the preferences are saved, but the Chromium browser issues a warning alert "Changes you made may not be saved." and forces you to choose between "OK" and "Cancel", both of which sounds since you want the changes saved. The good news is that the changes were saved. The bad news is that this is a very annoying and confusing warning.
Logs
Environment
efc ⑊ ~/H/v2 ▶ php please support:details
Environment
Application Name: Statamic
Laravel Version: 12.3.0
PHP Version: 8.3.19
Composer Version: 2.8.6
Environment: local
Debug Mode: ENABLED
URL: v2.test
Maintenance Mode: OFF
Timezone: UTC
Locale: en
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file
Storage
public/storage: NOT LINKED
Statamic
Addons: 0
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 5.52.0 Solo
efc ⑊ ~/H/v2 ▶
Installation
Fresh statamic/statamic site via CLI
Additional details
Possibly related, when using Bard fields similar "dirty" state confusion often arises in Chromium browsers. Virtually every page I have with a Bard field with complex sets ends up exhibiting similar behavior. Lots of spurious "dirty" alerts, most of which are mistaken. This reduces the impact of these alerts, making our users inclined to click "OK" without really considering the message. A dangerous state of affairs.