craftcms / craftcms/cms

[5.x]: Active tab in multi-tab fields resets after saving entry in CP

Open
#17,448 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
3.6k
Forks
705
Avg merge
1d 5h
Merged PRs (30d)
134

Description

What happened?

Image

Description

When editing an entry that contains a field with multiple tabs, switching to a different tab and saving the entry causes the editor to reset to the default tab.

This disrupts the workflow, as users must manually scroll down and re-select the tab they were working in after each save. Ideally, the editor should remember and restore the active tab position after saving, allowing users to continue editing seamlessly without interruption.

Steps to reproduce
  1. Add multiple tabs to a field
  2. Add this field to an entry on your page or post
  3. Open the page or post editor in the CP
  4. Switch to a different tab in your field
  5. Save and continue (cmd+s -> Mac)

Expected behavior: keep the current tab(s) open, and remember their position.

Actual behavior

Right now when you go to a tab within your page and hit save, you have to scroll down and switch to that tab again to make changes. (see the GIF video above)

Craft CMS version

5.7.10

PHP version

8.3

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the tab reset in the Craft CMS control panel using the listed steps and Craft 5.7.10. Locate the field-tab state handling around saving an entry; done means the selected tab and its scroll position remain after Save and continue.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.