When editing a resource with a Trix field. If that field contains content then the user is prompted to save changes when navigating away even when no changes have been made.
This does not occur when the Trix field is empty.
Detailed steps to reproduce the issue on a fresh Nova installation:
Create new Laravel project, install Nova and configure DB and user
Add migration to the user table to add a Text field and run the migration
// from the migration file
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->text('description')->nullable(true);
});
}
Add a Trix field to the User resource (app/Nova/User.php) to display the newly added in Nova
public function fields(NovaRequest $request)
{
return [
// default fields are here
Trix::make('Description');
];
}
Edit the User in Nova and add some content to the Trix field and save
Return to the edit screen for that User and then attempt to navigate away by clicking on the left hand menu
See the prompt to save changes even though you have made no changes.
Description:
When editing a resource with a Trix field. If that field contains content then the user is prompted to save changes when navigating away even when no changes have been made.
This does not occur when the Trix field is empty.
Detailed steps to reproduce the issue on a fresh Nova installation:
Create new Laravel project, install Nova and configure DB and user
Add migration to the user table to add a Text field and run the migration
Add a Trix field to the User resource (app/Nova/User.php) to display the newly added in Nova
Edit the User in Nova and add some content to the Trix field and save
Return to the edit screen for that User and then attempt to navigate away by clicking on the left hand menu
See the prompt to save changes even though you have made no changes.
Demo video attached
https://user-images.githubusercontent.com/31033292/167664586-d872bc5d-303c-4519-b7d0-886caffa8c0c.mp4