Problem/Motivation

When the submit button for the views bulk actions form is disabled it gets the grey text, but the background remains blue.

This is most apparent when using the Views Bulk Operations module as it has javascript which disables the button until content has been selected and an action has as well.

It seems that during the update to move the bulk actions into the floating bar at the bottom of the view, some CSS was missed/not removed. This was intentional in #3070558: Implement bulk operation designs

This line is setting the background colour, which overrides the disabled rule.

Steps to reproduce

  1. Install standard profile
  2. Add some content
  3. Visit admin/content, inspect the "Apply to selected items" button and add the disabled attribute to it.

Proposed resolution

Copy disabled styling into tableselect.css?

Issue fork drupal-3378091

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

acbramley created an issue. See original summary.

acbramley’s picture

Issue summary: View changes
StatusFileSize
new28.11 KB
acbramley’s picture

Issue summary: View changes

It seems like this colour was intentionally set in #3070558: Implement bulk operation designs - probably better to just add the :disabled classes into tableselect.css too?

acbramley’s picture

Status: Active » Needs review
StatusFileSize
new40.26 KB

This seems to do the trick (never done CSS changes in core so apologies if I've altered the files incorrectly 😅)

acbramley’s picture

Issue summary: View changes

Gauravvvv made their first commit to this issue’s fork.

gauravvvv’s picture

The .views-bulk-actions__item overrides only the background color of the primary element; there is no need to modify the button's color.

lauriii made their first commit to this issue’s fork.

lauriii’s picture

I pushed alternative solution to the MR that avoids copying the disabled styles to the tableselect styles.

acbramley’s picture

Status: Needs review » Reviewed & tested by the community

This is why I stay away from CSS 😂

Much nicer solution and works perfectly, thanks @lauriii!

edmund.dunn’s picture

Posting the static patch because using the MR doesn't allow pinning to a specific commit, so anyone can submit pretty much anything and inject it into our codebase IIRC. This also fixed our issue.

Status: Reviewed & tested by the community » Needs work
lauriii’s picture

Status: Needs work » Reviewed & tested by the community

Random fail

Status: Reviewed & tested by the community » Needs work
acbramley’s picture

Status: Needs work » Reviewed & tested by the community
larowlan’s picture

Updating credits

larowlan’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 11.x and backported to 10.1.x

thanks!

  • larowlan committed 89e557f9 on 10.1.x
    Issue #3378091 by acbramley, lauriii, Gauravvvv: Disabled primary button...

  • larowlan committed 38618b1e on 11.x
    Issue #3378091 by acbramley, lauriii, Gauravvvv: Disabled primary button...
idebr’s picture

Version: 11.x-dev » 10.1.x-dev

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.