Skip to content

Commit

Permalink
fix(gridfield): Show context menu when clicking anywhere in the treen…
Browse files Browse the repository at this point in the history
…av column
  • Loading branch information
Marco Crespi committed Dec 4, 2017
1 parent b469445 commit 80683de
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions javascript/GridFieldPageSectionsExtension.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@
var grid = this.getGridField();
var id = grid.data("id");
var rowId = $target.parents(".ss-gridfield-item").data("id");
var $treeNav = $target.parents(".col-treenav").first();
var $treeNav = $target.hasClass("col-treenav") ? $target :
$target.parents(".col-treenav").first();

if ($treeNav.length <= 0) {
return;
}
// If we don't have a col-treenav the user clicked on another column
if ($treeNav.length <= 0) return;
event.preventDefault();

var parentId = null;
Expand Down

0 comments on commit 80683de

Please sign in to comment.