Skip to content

Commit

Permalink
Fixed row click issue in product's upsell/crosssell/related grids (#3865
Browse files Browse the repository at this point in the history
)

Co-authored-by: Fabrizio Balliano <fabrizio.balliano@gmail.com>
  • Loading branch information
ADDISON74 and fballiano authored Mar 7, 2024
1 parent 49ea65a commit 2bb591e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/mage/adminhtml/grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -852,10 +852,10 @@ serializerController.prototype = {
this.rowInit(this.grid, row);
},
rowClick : function(grid, event) {
var trElement = Event.findElement(event, 'tr');
var tdElement = Event.findElement(event, 'td');
var isInput = Event.element(event).tagName == 'INPUT';
if(trElement){
var checkbox = Element.select(trElement, 'input');
if(tdElement){
var checkbox = Element.select(tdElement, 'input');
if(checkbox[0] && !checkbox[0].disabled){
var checked = isInput ? checkbox[0].checked : !checkbox[0].checked;
this.grid.setCheckboxChecked(checkbox[0], checked);
Expand Down

0 comments on commit 2bb591e

Please sign in to comment.