silverstripe / silverstripe-cms

Silverstripe CMS - this is a module for Silverstripe Framework rather than a standalone app. Use https://github.com/silverstripe/silverstripe-installer/ to set this up.
http://silverstripe.org/
BSD 3-Clause "New" or "Revised" License
516 stars 333 forks source link

Jumping to random CMS tabs when navigating pages #2924

Closed maxime-rainville closed 9 months ago

maxime-rainville commented 9 months ago

Module version(s) affected

5.1, but basicaly every version ever made.

Description

The CMS tries to remember what tab you were looking at when you save your page.

This is there so the content author stays on the same tab when the response comes back from the server. However, it remember your tab for the rest of your session. So you keep going back to that tab by default all the time.

How to reproduce

  1. Go to a CMS page with tabs.
  2. Access a tab different from Main.
  3. Save the page.
  4. You stay on the same tab.
  5. Navigate to a different page in the CMS.
  6. Come back to your original page.

Expected behaviour: You view the main tab. Actual: The CMS loads the tab you were looking at step 4.

Screencast from 20-02-24 17:09:35.webm

Possible Solution

Find the bit that reload the tab you were looking at on step 4, and unset the session storage flag after you read it.

Additional Context

The currently displayed tab is recorded in the session storage on save.

image

Validations

satrun77 commented 9 months ago

It is in admin module https://github.com/silverstripe/silverstripe-admin/blob/cfd8e5e927581d81ee9998d39115220743cf949d/client/src/legacy/LeftAndMain.js#L894

satrun77 commented 9 months ago

PR in https://github.com/silverstripe/silverstripe-admin/pull/1683 but I'm still testing it

GuySartorelli commented 9 months ago

Closing as a duplicate of https://github.com/silverstripe/silverstripe-admin/issues/1684