diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index 041fc6fa8..b6564fa6a 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -788,8 +788,8 @@ define([ style : 'width: 200px;', placeHolder : this.txtAddText, validateOnBlur: false - }).on('changed:after', function() { - if (me.coreProps && me.api) { + }).on('changed:after', function(input, newValue, oldValue) { + if (newValue !== oldValue && me.coreProps && me.api) { me.coreProps.asc_putTitle(me.inputTitle.getValue()); me.api.asc_setCoreProps(me.coreProps); } @@ -799,8 +799,8 @@ define([ style : 'width: 200px;', placeHolder : this.txtAddText, validateOnBlur: false - }).on('changed:after', function() { - if (me.coreProps && me.api) { + }).on('changed:after', function(input, newValue, oldValue) { + if (newValue !== oldValue && me.coreProps && me.api) { me.coreProps.asc_putSubject(me.inputSubject.getValue()); me.api.asc_setCoreProps(me.coreProps); } @@ -810,8 +810,8 @@ define([ style : 'width: 200px;', placeHolder : this.txtAddText, validateOnBlur: false - }).on('changed:after', function() { - if (me.coreProps && me.api) { + }).on('changed:after', function(input, newValue, oldValue) { + if (newValue !== oldValue && me.coreProps && me.api) { me.coreProps.asc_putDescription(me.inputComment.getValue()); me.api.asc_setCoreProps(me.coreProps); } @@ -848,6 +848,8 @@ define([ validateOnBlur: false, placeHolder: this.txtAddAuthor }).on('changed:after', function(input, newValue, oldValue) { + if (newValue == oldValue) return; + var val = newValue.trim(); if (!!val && val !== oldValue.trim()) { val.split(/\s*[,;]\s*/).forEach(function(item){ diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js index 476ed2a12..25ea27280 100644 --- a/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -678,8 +678,8 @@ define([ style : 'width: 200px;', placeHolder : this.txtAddText, validateOnBlur: false - }).on('changed:after', function() { - if (me.coreProps && me.api) { + }).on('changed:after', function(input, newValue, oldValue) { + if (newValue !== oldValue && me.coreProps && me.api) { me.coreProps.asc_putTitle(me.inputTitle.getValue()); me.api.asc_setCoreProps(me.coreProps); } @@ -689,8 +689,8 @@ define([ style : 'width: 200px;', placeHolder : this.txtAddText, validateOnBlur: false - }).on('changed:after', function() { - if (me.coreProps && me.api) { + }).on('changed:after', function(input, newValue, oldValue) { + if (newValue !== oldValue && me.coreProps && me.api) { me.coreProps.asc_putSubject(me.inputSubject.getValue()); me.api.asc_setCoreProps(me.coreProps); } @@ -700,8 +700,8 @@ define([ style : 'width: 200px;', placeHolder : this.txtAddText, validateOnBlur: false - }).on('changed:after', function() { - if (me.coreProps && me.api) { + }).on('changed:after', function(input, newValue, oldValue) { + if (newValue !== oldValue && me.coreProps && me.api) { me.coreProps.asc_putDescription(me.inputComment.getValue()); me.api.asc_setCoreProps(me.coreProps); } @@ -738,6 +738,8 @@ define([ validateOnBlur: false, placeHolder: this.txtAddAuthor }).on('changed:after', function(input, newValue, oldValue) { + if (newValue == oldValue) return; + var val = newValue.trim(); if (!!val && val !== oldValue.trim()) { val.split(/\s*[,;]\s*/).forEach(function(item){ diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index a1299b7fc..f1ab49c2d 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -1129,8 +1129,8 @@ define([ style : 'width: 200px;', placeHolder : this.txtAddText, validateOnBlur: false - }).on('changed:after', function() { - if (me.coreProps && me.api) { + }).on('changed:after', function(input, newValue, oldValue) { + if (newValue !== oldValue && me.coreProps && me.api) { me.coreProps.asc_putTitle(me.inputTitle.getValue()); me.api.asc_setCoreProps(me.coreProps); } @@ -1140,8 +1140,8 @@ define([ style : 'width: 200px;', placeHolder : this.txtAddText, validateOnBlur: false - }).on('changed:after', function() { - if (me.coreProps && me.api) { + }).on('changed:after', function(input, newValue, oldValue) { + if (newValue !== oldValue && me.coreProps && me.api) { me.coreProps.asc_putSubject(me.inputSubject.getValue()); me.api.asc_setCoreProps(me.coreProps); } @@ -1151,8 +1151,8 @@ define([ style : 'width: 200px;', placeHolder : this.txtAddText, validateOnBlur: false - }).on('changed:after', function() { - if (me.coreProps && me.api) { + }).on('changed:after', function(input, newValue, oldValue) { + if (newValue !== oldValue && me.coreProps && me.api) { me.coreProps.asc_putDescription(me.inputComment.getValue()); me.api.asc_setCoreProps(me.coreProps); } @@ -1189,6 +1189,8 @@ define([ validateOnBlur: false, placeHolder: this.txtAddAuthor }).on('changed:after', function(input, newValue, oldValue) { + if (newValue == oldValue) return; + var val = newValue.trim(); if (!!val && val !== oldValue.trim()) { val.split(/\s*[,;]\s*/).forEach(function(item){