diff --git a/public/js/pimcore/asset/metadata/grid.js b/public/js/pimcore/asset/metadata/grid.js index 47365ea780..922f01281d 100644 --- a/public/js/pimcore/asset/metadata/grid.js +++ b/public/js/pimcore/asset/metadata/grid.js @@ -246,6 +246,9 @@ pimcore.asset.metadata.grid = Class.create({ //enable different editors per row editor.editors.each(function (e) { try { + if (e.fieldInfo?.layout?.fieldtype === 'manyToManyRelation') { + return; + } // complete edit, so the value is stored when hopping around with TAB e.completeEdit(); Ext.destroy(e); diff --git a/public/js/pimcore/element/helpers/gridCellEditor.js b/public/js/pimcore/element/helpers/gridCellEditor.js index 37d33643b1..8adfdf4ea5 100644 --- a/public/js/pimcore/element/helpers/gridCellEditor.js +++ b/public/js/pimcore/element/helpers/gridCellEditor.js @@ -25,10 +25,6 @@ Ext.define('pimcore.element.helpers.gridCellEditor', { this.callParent(); }, - getValue: function() { - return Math.random(); - }, - startEdit: function(el, value, /* private: false means don't focus*/ doFocus) { @@ -121,7 +117,11 @@ Ext.define('pimcore.element.helpers.gridCellEditor', { text: t("save"), iconCls: 'pimcore_icon_save', handler: function() { - var newValue = tag.getCellEditValue(); + if (typeof tag.isDirty === 'function' && tag.isDirty() === false) { + this.editWin.close(); + return; + } + const newValue = tag.getCellEditValue(); this.setValue(newValue); this.completeEdit(false); this.editWin.close(); @@ -149,7 +149,7 @@ Ext.define('pimcore.element.helpers.gridCellEditor', { startValue = me.startValue, value; - if(fieldInfo.layout.noteditable) { + if (fieldInfo.layout.noteditable) { return; }