diff --git a/apps/common/main/lib/component/ComboBox.js b/apps/common/main/lib/component/ComboBox.js index edfc2daaa..d65fbf900 100644 --- a/apps/common/main/lib/component/ComboBox.js +++ b/apps/common/main/lib/component/ComboBox.js @@ -360,20 +360,15 @@ define([ return false; } else if (e.keyCode == Common.UI.Keys.RETURN && (this.editable || this.isMenuOpen())) { + var isopen = this.isMenuOpen(); $(e.target).click(); - var me = this; if (this.rendered) { if (Common.Utils.isIE) this._input.trigger('change', { onkeydown: true }); else this._input.blur(); } - if (!this.isMenuOpen()) { - if ((this.getRawValue() === this.lastValue)) - return true; - this.setRawValue(this._input.val()); - } - return false; + return !isopen; } else if (e.keyCode == Common.UI.Keys.ESC && this.isMenuOpen()) { this._input.val(this.lastValue); diff --git a/apps/common/main/lib/component/ComboBoxFonts.js b/apps/common/main/lib/component/ComboBoxFonts.js index 070536ade..848f33018 100644 --- a/apps/common/main/lib/component/ComboBoxFonts.js +++ b/apps/common/main/lib/component/ComboBoxFonts.js @@ -131,6 +131,8 @@ define([ if ($(e.target).closest('input').length) { // enter in input field if (this.lastValue !== this._input.val()) this._input.trigger('change'); + else + return true; } else { // enter in dropdown list $(e.target).click(); if (this.rendered) { diff --git a/apps/documenteditor/main/app/view/DropcapSettingsAdvanced.js b/apps/documenteditor/main/app/view/DropcapSettingsAdvanced.js index 6670875e4..b5da68de6 100644 --- a/apps/documenteditor/main/app/view/DropcapSettingsAdvanced.js +++ b/apps/documenteditor/main/app/view/DropcapSettingsAdvanced.js @@ -551,8 +551,11 @@ define([ if (combo.getSelectedRecord()) { me._changedProps.put_XAlign(record.value); } else { - me._changedProps.put_XAlign(undefined); - me._changedProps.put_X(Common.Utils.Metric.fnRecalcToMM(Common.Utils.String.parseFloat(record.value))); + var number = Common.Utils.String.parseFloat(record.value); + if (!isNaN(number)) { + me._changedProps.put_XAlign(undefined); + me._changedProps.put_X(Common.Utils.Metric.fnRecalcToMM(number)); + } } } }, me)) @@ -600,8 +603,11 @@ define([ if (combo.getSelectedRecord()) { me._changedProps.put_YAlign(record.value); } else { - me._changedProps.put_YAlign(undefined); - me._changedProps.put_Y(Common.Utils.Metric.fnRecalcToMM(Common.Utils.String.parseFloat(record.value))); + var number = Common.Utils.String.parseFloat(record.value); + if (!isNaN(number)) { + me._changedProps.put_YAlign(undefined); + me._changedProps.put_Y(Common.Utils.Metric.fnRecalcToMM(Common.Utils.String.parseFloat(record.value))); + } } } }, me))