Fix stopPropagation on click if no GridFieldEditableColumns

stopPropagation shouldn't fire if no GridFieldEditableColumns was added. It forces user to click on edit button on the far right instead of directly being able to click anywhere on the row.
This commit is contained in:
Martin Portevin 2018-01-14 08:44:17 +01:00 committed by GitHub
parent dc34dbe781
commit 30a4f34fbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -250,7 +250,7 @@
* GridFieldEditableColumns * GridFieldEditableColumns
*/ */
$('.grid-field .ss-gridfield-item').entwine({ $('.ss-gridfield-editable .ss-gridfield-item').entwine({
onclick: function(e) { onclick: function(e) {
// Prevent the default row click action when clicking a cell that contains a field // Prevent the default row click action when clicking a cell that contains a field
if (this.find('.editable-column-field').length) { if (this.find('.editable-column-field').length) {