[hotfix] don't add trigger if the autoname field and fieldname is not same (#4074)

This commit is contained in:
Makarand Bauskar 2017-09-06 19:25:30 +05:30 committed by GitHub
parent 43f4485c54
commit 41f03cd303

View file

@ -29,7 +29,8 @@ frappe.ui.form.ControlData = frappe.ui.form.ControlInput.extend({
if (!this.df.parent) return;
this.meta = frappe.get_meta(this.df.parent);
if (this.meta && this.meta.autoname
&& this.meta.autoname.substr(0, 6)==='field:') {
&& this.meta.autoname.substr(0, 6)==='field:'
&& this.meta.autoname.substr(6) === this.df.fieldname) {
this.$input.on('keyup', () => {
this.set_description('');
if (this.doc && this.doc.__islocal) {