Make WordPress Core

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#16810 closed defect (bug) (fixed)

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

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


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 5 years ago.
make sure -no-js styling doesn't get overridden by more specific instructions elsewhere
16810.patch (705 bytes) - added by SergeyBiryukov 4 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 follow-up: @hakre5 years ago

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

comment:2 in reply to: ↑ 1 @deepak.seth5 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.

@solarissmoke5 years ago

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

comment:3 @solarissmoke5 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 5 years ago by solarissmoke (previous) (diff)

comment:4 @nacin4 years ago

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

I'm comfortable with this patch. Early 3.3.

comment:5 @azizur4 years ago

  • Cc azizur added

comment:6 @SergeyBiryukov4 years ago

  • Milestone changed from Future Release to 3.3

comment:7 @azaozz4 years ago

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

comment:8 @azaozz4 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

comment:9 @solarissmoke4 years ago

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

comment:10 @solarissmoke4 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

@SergeyBiryukov4 years ago

comment:11 @SergeyBiryukov4 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.

comment:12 @solarissmoke4 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.

comment:13 @azaozz4 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

comment:14 @duck_4 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.