uchicago-library / library_website

The University of Chicago Library Website
5 stars 5 forks source link

Move page button is invisible #676

Closed bbusenius closed 1 year ago

bbusenius commented 1 year ago

Expected behavior

When trying to move a page in Wagtail the page editor should be able to select a new parent page for the page being moved. This is done by clicking on a button in the move page dialog.

Actual behavior

The button for moving pages is invisible!

image Note: There should be a set of buttons next to where it says, "New parent page".

The page should look like this:

image

Steps to reproduce

You will see the move page dialog but there will be no way to move the page. If you hover around to the right of the dialog you will find an invisible button.

Related code

This is a problem with core Wagtail. It's due to a misapplied CSS4 media query that basically says, "if a device supports hover, set the opacity to 0". Because of this, the problem only affects desktop computers and other devices with a hover state. The problem does not manifest on mobile devices.

@media (hover: hover)
.chooser__actions {
  opacity: 0;
}

Other information:**

This problem effects desktop computers. It does not effect mobile devices. It can likely be fixed with the insert_global_admin_css hook: https://docs.wagtail.org/en/stable/reference/hooks.html#insert-global-admin-css