WordPress.org

Make WordPress Core

Opened 14 months ago

Closed 3 months ago

Last modified 3 months ago

#51551 closed defect (bug) (fixed)

Unclickable area within admin menu

Reported by: johnbillion Owned by: johnbillion
Milestone: 5.9 Priority: normal
Severity: normal Version:
Component: Administration Keywords: good-first-bug has-screenshots has-patch
Focuses: ui, css Cc:

Description

When a top level admin menu item is expanded, for example when viewing the Posts screen, there is a dead area immediately below the top level menu item and its first child menu item which is unclickable but still shows the pointer cursor.

I occasionally click this area and wonder why my click didn't register.

Steps to reproduce:

  1. Click the Posts menu
  2. Hover your mouse cursor immediately below the top level Posts item but above the All Posts item
  3. Observe that your cursor shows a pointer but this area is not clickable

See attached screenshots for more info.

Attachments (9)

Screenshot 2020-10-16 at 11.10.57.png (33.9 KB) - added by johnbillion 14 months ago.
Screenshot 2020-10-16 at 11.11.26.png (25.3 KB) - added by johnbillion 14 months ago.
51551.patch (429 bytes) - added by opurockey 13 months ago.
Apply patch
51551.1.patch (429 bytes) - added by opurockey 13 months ago.
Apply patch
admin-menu.png (44.1 KB) - added by ryelle 6 months ago.
51551.2.diff (379 bytes) - added by kurudrive 5 months ago.
51551_1_ss.png (364.7 KB) - added by kurudrive 5 months ago.
51551.3.diff (362 bytes) - added by kurudrive 5 months ago.
admin-menu- 51551-3-diff.mov (802.4 KB) - added by kurudrive 5 months ago.

Download all attachments as: .zip

Change History (22)

#1 @johnbillion
14 months ago

  • Keywords has-screenshots added

This ticket was mentioned in Slack in #core by ankurchauhan126. View the logs.


13 months ago

This ticket was mentioned in PR #685 on WordPress/wordpress-develop by colinduwe.


13 months ago

  • Keywords has-patch added; needs-patch removed

Removed unclickable top padding of sub-menu <ul>. Added top padding to <a> of first sub-menu <li> so it is clickable.

Trac ticket: https://core.trac.wordpress.org/ticket/51551

@opurockey
13 months ago

Apply patch

@opurockey
13 months ago

Apply patch

@ryelle
6 months ago

#4 @ryelle
6 months ago

  • Keywords reporter-feedback added

Now that the submenu items have a hover indicator, do you still think the gap is an issue? There's more visual feedback that you're not hovering over the item yet.

@kurudrive
5 months ago

@kurudrive
5 months ago

#5 @kurudrive
5 months ago

Hi everyone.

At first, I checked @opurockey 's 51551.1.patch.
I can looks like some improvement but still remaining probrem.

https://core.trac.wordpress.org/raw-attachment/ticket/51551/51551_1_ss.png

So I created another patch file.

https://core.trac.wordpress.org/attachment/ticket/51551/51551.3.diff

@johnbillion @ryelle
Please check when you have time.

Last edited 5 months ago by kurudrive (previous) (diff)

@kurudrive
5 months ago

This ticket was mentioned in PR #1629 on WordPress/wordpress-develop by circlecube.


3 months ago

This patch removes the cursor:pointer rule on #adminmenu li rather than overriding it for #adminmenu .submenu as in the previous patch.

This rule does not appear to need to be here since the cursor pointer changes for any anchor elements in the menu and the pointer on the li is the reported bug. So, unless this is here for a reason we can remove some code. Always prefer to solve issues by removing code rather than adding code. Looked back at the history and that has been there 9+ years, and I believe the admin has been refreshed at least once since then so I believe it to just be a legacy rule that really isn't needed.

Trac ticket: https://core.trac.wordpress.org/ticket/51551

#7 @circlecube
3 months ago

@kurudrive your patch did fix the issue for me. It fixes the hover state issue at the top and at the bottom of the sub-menu. I appreciate that it's not using any negative margins too! While testing I found that the rule your patch overrides may not be needed in the first place, submitted another patch to simply remove that rule rather than override it for submenus.

Would love someone else to test and weigh in on if that rule was useful for any edge cases. From my investigation, the cursor shouldn't display for all <li>s in the #adminmenu, as anything that is clickable is an anchor or a button.

#8 @circlecube
3 months ago

  • Keywords needs-testing added

#9 @johnbillion
3 months ago

  • Keywords reporter-feedback needs-testing removed
  • Milestone changed from Awaiting Review to 5.9
  • Owner set to johnbillion
  • Status changed from new to accepted

@circlecube This does indeed fix the root cause of a cursor being shown on an unclickable area. Let's go with this.

#10 @kurudrive
3 months ago

@circlecube Hi. I feel your patch is better than my patch. Thanks.

#11 @johnbillion
3 months ago

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

In 51684:

Administration: Remove a misleading pointer cursor from list items in the admin menu.

This prevents unclickable areas within the menu from appearing clickable.

Props circlecube, kurudrive, ryelle, opurockey

Fixes #51551

Note: See TracTickets for help on using tickets.