WordPress.org

Make WordPress Core

Opened 8 months ago

Closed 8 months ago

Last modified 6 months ago

#52662 closed defect (bug) (fixed)

Classic Editor: word count not hidden by `hide-if-no-js`

Reported by: sabernhardt Owned by: sabernhardt
Milestone: 5.8 Priority: normal
Severity: minor Version: 4.4
Component: Editor Keywords: has-patch
Focuses: css Cc:

Description

Changeset [34275] added a hide-if-no-js class to <td id="wp-word-count">, but the display property on #wp-word-count overrides that.

#wp-word-count {
    display: block;
    padding: 2px 10px;
}

Attachments (2)

nojs-word-count-displays.png (31.7 KB) - added by sabernhardt 8 months ago.
52662.patch (285 bytes) - added by sabernhardt 8 months ago.
removing display: block

Download all attachments as: .zip

Change History (8)

@sabernhardt
8 months ago

removing display: block

#1 follow-up: @sabernhardt
8 months ago

  • Keywords has-patch added

The display: block style had been specified at least since changeset 12553, but I don't know of any reason to keep that when .autosave-info is still the browser default (table-cell).

#2 @mukesh27
8 months ago

I can reproduce the issue in the classic editor with disabling JS and patch 52662.patch working fine for me.

#3 in reply to: ↑ 1 @SergeyBiryukov
8 months ago

Replying to sabernhardt:

The display: block style had been specified at least since changeset 12553

Just confirming that it was indeed a part of the initial commit in [7854] / #4807.

#4 @SergeyBiryukov
8 months ago

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

In 50512:

Classic Editor: Make sure word count is hidden if JavaScript is disabled.

Removing display: block from the element allows the .hide-if-no-js class to have the intended effect.

Follow-up to [34275].

Props sabernhardt, mukesh27.
Fixes #52662.

This ticket was mentioned in Slack in #core-test by boniu91. View the logs.


6 months ago

#6 @Boniu91
6 months ago

Tested on Chrome, working well.

Note: See TracTickets for help on using tickets.