Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#10366 closed defect (bug) (fixed)

State of collapsing sections in admin sidebar isn't remembered properly

Reported by: caesarsgrunt's profile caesarsgrunt Owned by: westi's profile westi
Milestone: 2.9 Priority: normal
Severity: major Version: 2.8
Component: Menus Keywords:
Focuses: Cc:

Description

If you expand or collapse any section of the admin sidebar whilst viewing a page from another section, then after going to another page the section with the page which you were viewing will be expanded. This is very annoying, and seems to have been introduced in 2.8 - I didn't have this problem in 2.7.

Attachments (3)

10366.diff (552 bytes) - added by westi 15 years ago.
Fix for the issue. Sync the two selectors for jQuery
10366.2.diff (532 bytes) - added by caesarsgrunt 15 years ago.
Fix for the issue, including wrongly expanding current section.
10366.3.diff (534 bytes) - added by caesarsgrunt 15 years ago.
Updated patch for latest trunk

Download all attachments as: .zip

Change History (21)

#1 follow-up: @janeforshort
15 years ago

  • Milestone changed from 2.9 to Future Release

I agree it's annoying when this happens, though it seems to be browser dependent. Since no one has claimed this and submitted a patch, punting as we are now in beta.

#2 @janeforshort
15 years ago

  • Component changed from General to UI

#3 @caesarsgrunt
15 years ago

This is far worse now than it used to be; often opening completely unrelated menus on the next page load.

#4 @caesarsgrunt
15 years ago

  • Component changed from UI to Menus
  • Owner set to ryan
  • Severity changed from normal to major

#5 in reply to: ↑ 1 @caesarsgrunt
15 years ago

Replying to janeforshort:

I agree it's annoying when this happens, though it seems to be browser dependent.

I get this problem in Firefox, markjaquith gets it in Safari.

These are probably the most common browsers for accessing the WP backend, at least for WP.org.

I haven't tested it affects any other browsers.

@westi
15 years ago

Fix for the issue. Sync the two selectors for jQuery

#6 @westi
15 years ago

  • Keywords has-patch needs-testing added
  • Owner changed from ryan to westi
  • Status changed from new to accepted

Attached patch fixes the issue for me.

#7 @caesarsgrunt
15 years ago

That mostly fixes it for me, but one issue remains.

With the whole menu collapsed (default state), click on, say, Posts.

Now expand, say, Media, by clicking the arrow.

Now go to, say, Dashboard. You'll notice that Posts has been left expanded as well as Media.

Firefox 3.5.5, WP revision [12320]

@caesarsgrunt
15 years ago

Fix for the issue, including wrongly expanding current section.

#8 @caesarsgrunt
15 years ago

  • Milestone changed from Future Release to 2.9

I think this patch completely fixes the issue, including the problem described in my last comment.

It also makes it impossible to store the status of the current section, but that was more or less a bug anyway - the section was open just from visiting it, but to store it as open you had to close it and open it again. Better without.

Try it and see what you think.

Moving this back to 2.9, since it's a simple bugfix for a major bug and has a patch.

#9 @markjaquith
15 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

(In [12334]) Fix the case of the curiously expanding wp-admin menu. props westi. fixes #10366

#10 follow-up: @caesarsgrunt
15 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Westi's patch, which you've committed, doesn't fix the entire issue, though it fixes most of it.

My patch fixed the whole thing...

#11 in reply to: ↑ 10 ; follow-up: @westi
15 years ago

Replying to caesarsgrunt:

Westi's patch, which you've committed, doesn't fix the entire issue, though it fixes most of it.

My patch fixed the whole thing...

Can you detail how this is still broken and in which browsers you have tested please.

#12 in reply to: ↑ 11 @caesarsgrunt
15 years ago

Replying to westi:

Can you detail how this is still broken and in which browsers you have tested please.

Replying to caesarsgrunt:

With the whole menu collapsed (default state), click on, say, Posts.

Now expand, say, Media, by clicking the arrow.

Now go to, say, Dashboard. You'll notice that Posts has been left expanded as well as Media.

Firefox 3.5.5, WP revision [12320]

Now obviously also tested with latest trunk (r12337).
Also tested in Safari 4, but if you look at the code (see my patch 10366.2.diff) then it's obvious that this issue would occur in all browsers which correctly interpreted the code.

#13 @caesarsgrunt
15 years ago

Just to make it clear, this applies to all sections, not just the example of Posts and Media.

@caesarsgrunt
15 years ago

Updated patch for latest trunk

#14 follow-ups: @westi
15 years ago

  • Keywords has-patch needs-testing removed
  • Milestone changed from 2.9 to 3.0

With this patch attached the following is now broken:

  • Menus appear to work ok if you are on the dashboard.
  • If you are on Posts and Expand links and refresh the page Media gets expanded.\

I think the issue you are trying to remove is the memory of the current page subment being open when you switch pages only if you expand another submenu while on that page?

Maybe that should be a new ticket for 3.0 as the current change is a significant improvement over the jumping menus.

Please could you open a new ticket for that.

#15 in reply to: ↑ 14 @caesarsgrunt
15 years ago

Replying to westi:

  • If you are on Posts and Expand links and refresh the page Media gets expanded.\

I don't get this problem. I don't see how it could be caused by this patch, anyway.

Yes, I could open a different ticket for 3.0 if you want, but it is part of the same issue and is easily fixed. There's no reason not to do it for 2.9 that I can see.

#16 in reply to: ↑ 14 @caesarsgrunt
15 years ago

Another thought - are you sure you are using latest trunk (IE with the first patch comitted)? The issue you are describing sounds like it's the original issue which your first patch fixed.

#17 @azaozz
15 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [12347]) Save menu sections' opened/closed state separately, fixes #10366

#18 @scribu
15 years ago

  • Milestone changed from 3.0 to 2.9
Note: See TracTickets for help on using tickets.