Opened 9 months ago

Closed 6 months ago

#21611 closed defect (bug) (fixed)

Remove CSS hover styling of postboxes with disabled JS

Reported by: TobiasBg Owned by: nacin
Priority: normal Milestone: 3.5
Component: Administration Version:
Severity: normal Keywords: has-patch commit
Cc:

Description

If JS is disabled in the browser, post metaboxes can neither be moved/sorted nor expanded/shrunken.
However, due to the current wp-admin-CSS, the boxes still show effects on mouse hover (like text color change, other mouse pointers, visible arrow handle).
This can confuse users as nothing is happening when clicking on them, so I'd say that this is a (though rare to see) styling bug.

I suggest to simply only do these hover effects, if JS is enabled.
This is as simple as prepending the relevant CSS selectors with the ".js" class that we have (or not have) on <body>.

The attached patch does this for post metaboxes, as well as for the widgets page, where the same occurs under a different name.

Attachments (2)

21611.diff (5.7 KB) - added by TobiasBg 7 months ago.
(Refreshed) patch to fix CSS styling of metaboxes with disabled JS
21611-retina.diff (2.1 KB) - added by TobiasBg 6 months ago.
Fix this for retina displays as well

Download all attachments as: .zip

Change History (16)

  • Component changed from General to UI
  • Keywords ui-feedback added
  • Component changed from UI to Administration
  • Keywords needs-refresh added; ui-feedback removed
  • Milestone changed from Awaiting Review to Future Release

Makes sense to me.

  • Keywords 3.6-early added

Great :-)

I will gladly refresh the patch for the next dev cycle, as I assume that this comes to late for 3.5.

Patch just needs a refresh - doesn't really have much to do with which dev cycle.

  • Keywords needs-refresh 3.6-early removed

Ah, I had misinterpreted you :-) I had thought that there are more changes necessary, due to recent CSS changes in core. Turned out that all that was needed was the switch to the new CSS file names.

So, here's the refreshed patch.

Last edited 7 months ago by TobiasBg (previous) (diff)

(Refreshed) patch to fix CSS styling of metaboxes with disabled JS

  • Keywords commit added
  • Milestone changed from Future Release to 3.5

This is so much better for no JS - I'd consider current behavior buggy looking and feeling. Makes perfect sense - let's do it.

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

In 22391:

For postboxes, only show arrows/handles on hover when JS is enabled. props TobiasBg. fixes #21611.

Still showing on Retina displays. Patch forthcoming this evening if noone gets to it first.

http://cloud.stephanis.info/image/2h3k3H1q1R0H

  • Keywords needs-patch added; has-patch commit removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

Seems we need to add that same selector to the media query blocks where applicable for HiDPI, even as unlikely as retina + no-JS seems.

  • Keywords has-patch added; needs-patch removed

Sorry, must have missed these...

Here's a patch to also apply this change to retina. It would be great, if someone could test this, please.

Fix this for retina displays as well

Tested and works!

  • Keywords commit added
  • Resolution set to fixed
  • Status changed from reopened to closed

In 22582:

For postboxes, only show arrows/handles on hover when JS is enabled (for HiDPI). props TobiasBg. fixes #21611.

Note: See TracTickets for help on using tickets.