Closed
Description
Describe the Bug
I've come across an issue with the multi-tenant plugin where the "Leave without saving" message appears when navigating away from page records when nothing has changed.
Link to the code that reproduces this issue
https://github.com/payloadcms/payload/tree/main/examples/multi-tenant
Reproduction Steps
Steps to reproduce
- Log in as super-admin (using demo@payloadcms.com credentials)
- Do not select any tenant in the tenant selector
- Open any page record
- Notice that the tenant selector automatically updates to match the tenant assigned to the page
- Try to navigate away from the page without making any changes
- A "Leave without saving" prompt appears even though no changes were made
Expected behavior
Since no changes were made to the record, navigating away should happen without any prompt.
Actual behavior
The system prompts with a "Leave without saving" message even though no changes were made to the record.
Additional information
- This issue only occurs when initially loading the page without a tenant selected
- If a tenant is selected before opening a page record, the issue does not occur
Which area(s) are affected? (Select all that apply)
plugin: multi-tenant
Environment Info
- payload: 3.41.0
- @payloadcms/plugin-multi-tenant: 3.41.0
Activity
fix(plugin-multi-tenant): unnecessary modal appearing (#12854)
github-actions commentedon Jul 3, 2025
🚀 This is included in version v3.45.0
github-actions commentedon Jul 11, 2025
This issue has been automatically locked.
Please open a new issue if this issue persists with any additional detail.