Merge pull request #653 from ONLYOFFICE/feature/bug-48260

Feature/bug 48260
This commit is contained in:
Julia Radzhabova 2021-01-16 19:05:57 +03:00 committed by GitHub
commit 77574d2135
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 6 deletions

View file

@ -360,15 +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();
}
return false;
return !isopen;
}
else if (e.keyCode == Common.UI.Keys.ESC && this.isMenuOpen()) {
this._input.val(this.lastValue);

View file

@ -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) {

View file

@ -548,8 +548,15 @@ define([
})
.on('changed:after', _.bind(function(combo, record) {
if (me._changedProps) {
me._changedProps.put_XAlign(undefined);
me._changedProps.put_X(Common.Utils.Metric.fnRecalcToMM(Common.Utils.String.parseFloat(record.value)));
if (combo.getSelectedRecord()) {
me._changedProps.put_XAlign(record.value);
} else {
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))
.on('selected', _.bind(function(combo, record) {
@ -593,8 +600,15 @@ define([
})
.on('changed:after', _.bind(function(combo, record) {
if (me._changedProps) {
me._changedProps.put_YAlign(undefined);
me._changedProps.put_Y(Common.Utils.Metric.fnRecalcToMM(Common.Utils.String.parseFloat(record.value)));
if (combo.getSelectedRecord()) {
me._changedProps.put_YAlign(record.value);
} else {
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))
.on('selected', _.bind(function(combo, record) {