WordPress.org

Make WordPress Core

Opened 3 weeks ago

Closed 11 hours ago

#40056 closed defect (bug) (fixed)

Shift-click to select a range of checkboxes isn't working anymore since 4.7.3 update

Reported by: ZehrGut Owned by: afercia
Milestone: 4.7.4 Priority: normal
Severity: normal Version: 4.7.3
Component: Administration Keywords: has-patch fixed-major
Focuses: ui, javascript Cc:

Description

Hello!
Shift-click to select a range of check-boxes in admin area isn't working anymore since 4.7.3 update. It worked perfectly before this 4.7.3 update.
Thanks in advance!

Attachments (1)

40056.diff (582 bytes) - added by afercia 2 weeks ago.

Download all attachments as: .zip

Change History (10)

#1 @swissspidy
3 weeks ago

I can confirm this.

Related change in 4.7.3: #39739.

See also #39842.

#2 @SergeyBiryukov
3 weeks ago

  • Component changed from General to Administration
  • Focuses ui administration added
  • Milestone changed from Awaiting Review to 4.7.4

#3 @swissspidy
2 weeks ago

  • Focuses javascript added; administration removed
  • Keywords needs-patch added
  • Owner set to afercia
  • Status changed from new to assigned

Improved in [38703] but broken in [40118]

#4 @afercia
2 weeks ago

Yep, the change in [40118] was a bad suggestion by me, sorry for that. I think #39842 is unrelated though, can't reproduce.

@afercia
2 weeks ago

#5 @afercia
2 weeks ago

  • Keywords has-patch added; needs-patch removed

So, before [38703] the original selector was:
$('tbody').children().children('.check-column').find(':checkbox').click( function(e) {

Because of #37973 this event needs to be delegated, and the selector was changed in [38703], then amended in [38706]:
$body.on( 'click', 'tbody .check-column :checkbox', function( event ) {

However, to support the edge case of nested tables (see #39739), it was changed again in [40118]:
$body.on( 'click', 'tbody > .check-column :checkbox', function( event ) {

The selector above doesn't actually select anything... instead it should be:
$body.on( 'click', 'tbody > tr > .check-column :checkbox', function( event ) {

which, starting from tbody, selects the children tr then the children .check-column and then all the :checkbox and should finally be equivalent to the original selector.

#6 @afercia
2 weeks ago

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

In 40268:

List Tables: After [38703], [38706], and [40118], adjust the jQuery selector to make the selection of a range of checkboxes work again.

Unprop afercia.
Fixes #40056.

#7 @afercia
2 weeks ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for 4.7.4 consideration.

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


9 days ago

#9 @swissspidy
11 hours ago

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

In 40327:

List Tables: After [38703], [38706], and [40118], adjust the jQuery selector to make the selection of a range of checkboxes work again.

Unprop afercia.
Fixes #40056.

Merges [40268] to the 4.7 branch.

Note: See TracTickets for help on using tickets.