Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#16810 closed defect (bug) (fixed)

hide-if-no-js not working on Most Used link

Reported by: deepakseth's profile deepak.seth Owned by: azaozz's profile azaozz
Milestone: 3.3 Priority: normal
Severity: minor Version:
Component: Administration Keywords: has-patch 3.3-early
Focuses: Cc:

Description

The Most Used link of hierarchical taxonomy like Category is shown on Post page with Java script disabled, which should get hidden by default.
The tab has hide-if-no-js class but it gets overridden with display:inline somehow.

Also shows on WordPress.com sites.

Attachments (2)

16810.diff (420 bytes) - added by solarissmoke 14 years ago.
make sure -no-js styling doesn't get overridden by more specific instructions elsewhere
16810.patch (705 bytes) - added by SergeyBiryukov 14 years ago.

Download all attachments as: .zip

Change History (16)

#1 follow-up: @hakre
14 years ago

Can you add a link on a wp.org install to reproduce it more easily?

#2 in reply to: ↑ 1 @deepak.seth
14 years ago

Replying to hakre:

Can you add a link on a wp.org install to reproduce it more easily?

To recreate the problem: disable the javascript->open the add new post page->here you can see the most used link on category widget,though i think it shouldn't be visible and it doesn't work either.

@solarissmoke
14 years ago

make sure -no-js styling doesn't get overridden by more specific instructions elsewhere

#3 @solarissmoke
14 years ago

  • Keywords has-patch added

It's getting overridden in wp-admin.css by

#side-sortables .category-tabs li, #side-sortables .add-menu-item-tabs li {
	display: inline
}

Actually this happens in quite a few places. We need to bump the importance of the no-js styling.

Last edited 14 years ago by solarissmoke (previous) (diff)

#4 @nacin
14 years ago

  • Keywords 3.3-early added
  • Milestone changed from Awaiting Review to Future Release

I'm comfortable with this patch. Early 3.3.

#5 @azizur
14 years ago

  • Cc azizur added

#6 @SergeyBiryukov
14 years ago

  • Milestone changed from Future Release to 3.3

#7 @azaozz
14 years ago

I'm generally very much against using !important anywhere but perhaps it's warranted in this case.

#8 @azaozz
14 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In [18664]:

Make hide-if-no-js and hide-if-js important, props solarissmoke, fixes #16810

#9 @solarissmoke
14 years ago

Turns out this causing some undesirable side-effects, maybe !important is a bad idea after all. See #18656.

#10 @solarissmoke
14 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#11 @SergeyBiryukov
14 years ago

So this probably should be fixed on a case-by-case basis.

16810.patch fixes the initial reported issue with the "Most Used" link.

#12 @solarissmoke
14 years ago

When I looked into this the first time I found at least 3-4 other cases where the same thing was happening. I can't remember where they were now but will see if I can find them.

Fixing them on a case-by-case basis is going to be tedious to maintain, because any change to the specificity of the selectors in future could cause the problem to resurface. That said, I can't think of a less awkward solution either.

#13 @azaozz
14 years ago

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

In [18668]:

Revert [18664] and handle any similar cases separately, props SergeyBiryukov, fixes #16810, fixes #18656

#14 @duck_
14 years ago

In [19179]:

Only hide "Most Used" category tab when the body has .no-js class. See #16810, fixes #19129.

Note: See TracTickets for help on using tickets.