WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#32309 closed defect (bug) (fixed)

.check-column select all should not toggle disabled inputs

Reported by: ragulka Owned by: wonderboymusic
Milestone: 4.4 Priority: normal
Severity: normal Version: 4.2.2
Component: General Keywords: has-patch
Focuses: ui, javascript, administration Cc:
PR Number:

Description

In common.js, starting on line 401 (https://core.trac.wordpress.org/browser/tags/4.2.2/src/wp-admin/js/common.js#L401) there is a common select/deselect all behaviour handler.

Currently, it only filters the checkboxes by looking if they are :visible, but it should also check for :disabled as it makes no sense to select/deselect via select/deselect all if the checkbox itself is disabled.

Disabling the checkbox is a valid use case for plugins that may want to show a table row, but disable editing/deleting it.

Attachments (1)

32309.diff (1.3 KB) - added by tywayne 4 years ago.

Download all attachments as: .zip

Change History (4)

@tywayne
4 years ago

#1 @tywayne
4 years ago

  • Keywords has-patch added

This section of common.js also addresses selecting multiple by use of shift+click. This patch corrects both the use of the select all checkboxes as well as shift+clicking.

#2 @wonderboymusic
4 years ago

  • Milestone changed from Awaiting Review to 4.4

#3 @wonderboymusic
4 years ago

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

In 34325:

Admin: when toggling select/deselect "all" via JS - :visible needs to be bound to not toggle disabled inputs.

Props tywayne.
Fixes #32309.

Note: See TracTickets for help on using tickets.