Grid: Right click fails to select new row if different row is selected

Bug #1776557 reported by Remington Steed
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
3.0
Fix Released
Medium
Unassigned
3.1
Fix Released
Medium
Unassigned

Bug Description

In web client grids, if a row is selected ("Row A") and you right-click a different row ("Row B"), the Actions menu appears, but the action will apply to "Row A" (which is still selected), not the row you just right-clicked (which is not selected).

After a right-click, the grid should de-select the previously selected row and select the right-clicked row before opening the Actions menu.

This bug can lead to performing various actions on an unintended row. For example, in a catalog record's Holdings View, you might delete the wrong copy, and the confirmation alert doesn't give enough detail to catch the mistake.

Revision history for this message
Kate Coleman (katecoleman) wrote :

+1

Yes, I've done the very thing you've described. You can right-click on that initial row, and the checkbox is selected and the row highlighted, but to highlight/checkbox another row, you MUST left click.

Changed in evergreen:
status: New → Confirmed
a. bellenir (abellenir)
Changed in evergreen:
assignee: nobody → a. bellenir (abellenir)
Revision history for this message
a. bellenir (abellenir) wrote :

here's a branch that will select the right-clicked row if it is not already selected: http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/abellenir/lp1669856-lp1776557-egGrid-right-click

note: this will deselect other rows in favor of the clicked row, in the even that you already have some rows selected, and then right click on an unselected row. this version of the code does not consider if you are holding ctrl or shift when you right-click.

it might be possible to support ctrl+right-click and shift+right-click by using $scope.handleRowClick($event, e.item); on line 662 instead of $event.target.click(), but this is incomplete. it seems to update $scope.selected as it should, but the display is not updated, so there is no visual indication of what rows you're actually operating on.

this branch also attempts to address bug #1669856, since the two are closely related.

Changed in evergreen:
assignee: a. bellenir (abellenir) → nobody
tags: added: pullrequest webstaffclient
Michele Morgan (mmorgan)
Changed in evergreen:
assignee: nobody → Michele Morgan (mmorgan)
Revision history for this message
Michele Morgan (mmorgan) wrote :

This fix is working well.

It allows using the intuitive Right click on a link within in a grid row to open the context menu, allowing opening the link in a new tab, and preserving any selections already made in the grid in the current tab, which addresses bug 1669856

Also addresses the right click fails to select issue in bug 1776557 by clearing the current selection(s) in a grid and refocusing the selection to the right-clicked row before opening the Actions menu.

My signoff branch is here:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/mmorgan/lp1669856-lp1776557-egGrid-right-click-signoff

I'm echoing this comment on both bugs.

tags: added: signedoff usability
Changed in evergreen:
assignee: Michele Morgan (mmorgan) → nobody
Revision history for this message
Chris Sharp (chrissharp123) wrote :

Pushed to master, rel_3_0, and rel_3_1. Thanks, abellenir and Michele!

Changed in evergreen:
status: Confirmed → Fix Committed
Changed in evergreen:
milestone: none → 3.2-beta
status: Fix Committed → Fix Released
status: Fix Released → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.