I have a content manager view set up with VBO. If the "preserve selection across pages" option is checked, and I click an item, scroll down, hold shift, and click another item, Chrome helpfully selects all the items between the two.

However, when I use these selected items to "modify node fields" in VBO, it only acts on the first and last item (i.e., the two that I actually "clicked" on) and ignores all the ones inbetween that Chrome selected for me. Looks like this bug disappears when "preserve selection across pages" is unchecked. Seems like maybe some JS has an onclick callback set to mark an item as selected, rather than checking the value of the checkbox, so since only the first and last are actually clicked, it only sees those two as selected.

Not a big deal since I there are workarounds (select all and manually unclick the unwanted ones, or play with the filters so that only the ones you want are available then do select all, or manually click each one if it's not a lot) but just a small annoyance since that feature of Chrome is very nice.

Comments

rooby’s picture

Title: "Preserve selection across pages" option doesn't work with Chrome's shift+click to select multiple checkboxes. » "Preserve selection across pages" option doesn't work with shift+click to select multiple checkboxes.

This is specific to the "Preserve selection across pages" option, but is not browser specific.

It also happens in firefox and probably others.

infojunkie’s picture

Good catch! I see this is actually a Drupal JS feature, as found in misc/tableselect.js:

Drupal.tableSelect = function() {
[..]

   // If this is a shift click, we need to highlight everything in the range.
    // Also make sure that we are actually checking checkboxes over a range and
    // that a checkbox has been checked or unchecked before.
    if (e.shiftKey && lastChecked && lastChecked != e.target) {
      // We use the checkbox's parent TR to do our range searching.
      Drupal.tableSelectRange($(e.target).parents('tr')[0], $(lastChecked).parents('tr')[0], e.target.checked);
    }

[..]
}
infojunkie’s picture

Status: Active » Fixed

Fixed in latest dev. Please give it a good test and let me know!

Status: Fixed » Closed (fixed)

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