Make WordPress Core

Opened 8 years ago

Closed 7 years ago

Last modified 7 years 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's profile ZehrGut Owned by: afercia's profile afercia
Milestone: 4.7.5 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 8 years ago.

Download all attachments as: .zip

Change History (17)

#1 @swissspidy
8 years ago

I can confirm this.

Related change in 4.7.3: #39739.

See also #39842.

#2 @SergeyBiryukov
8 years ago

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

#3 @swissspidy
8 years 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
8 years 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
8 years ago

#5 @afercia
8 years 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
8 years 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
8 years 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.


8 years ago

#9 @swissspidy
8 years 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.

#10 @swissspidy
7 years ago

#40092 was marked as a duplicate.

#11 @femur
7 years ago

It's still not working after upgrading to 4.7.4.

#12 @afercia
7 years ago

  • Milestone changed from 4.7.4 to 4.7.5
  • Resolution fixed deleted
  • Status changed from closed to reopened

@femur thanks! Hm, seems this is working on trunk but not on 4.7.4, not sure the right commit was back-ported. @swissspidy any insight?

#13 @dd32
7 years ago

Incorrect changeset was indeed merged back, sorry folks, it'll be fixed in 4.7.5

#14 @dd32
7 years ago

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

In 40512:

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

Unprop afercia.
Merges [40268] to the 4.7 branch.
Fixes #40056.

#15 @dd32
7 years ago

Just to note, [40327] was a merge of [40056] which thankfully was only tests which pass on 4.7 - I'm not going to remove them from the branch now that they're there, not doing any harm.

#16 @swissspidy
7 years ago

Ouch, sorry about that! Even though I usually double- and triple-check every commit and backport, I somehow mixed up ticket number and revision number.

Note: See TracTickets for help on using tickets.